From: John Resig Date: Wed, 13 Oct 2010 00:56:46 +0000 (-0400) Subject: Fix some gaps in the handling of event data properties. Thanks to @jitter in ff6ceadb... X-Git-Tag: 1.4.3~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=783bb2a85fe33d00e82f40c8dab484e1cf0c63a1;p=jquery.git Fix some gaps in the handling of event data properties. Thanks to @jitter in ff6ceadbfd470463e63708413eb5a55bd7e90c69 for the catches. --- diff --git a/src/event.js b/src/event.js index 1bbf1348d..8a40d0020 100644 --- a/src/event.js +++ b/src/event.js @@ -286,7 +286,7 @@ jQuery.event = { delete elemData.handle; if ( typeof elemData === "function" ) { - jQuery.removeData( elem, "events" ); + jQuery.removeData( elem, eventKey ); } else if ( jQuery.isEmptyObject( elemData ) ) { jQuery.removeData( elem ); diff --git a/test/unit/event.js b/test/unit/event.js index b37b253a8..6f753225d 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1838,7 +1838,7 @@ test("window resize", function() { ok( true, "Resize event fired." ); }).resize().unbind("resize"); - ok( !jQuery(window).data("events"), "Make sure all the events are gone." ); + ok( !jQuery(window).data("__events__"), "Make sure all the events are gone." ); }); /*