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-Url: http://git.asbjorn.it/?a=commitdiff_plain;ds=sidebyside;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 1bbf134..8a40d00 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 b37b253..6f75322 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." ); }); /*