Fix some gaps in the handling of event data properties. Thanks to @jitter in ff6ceadb...
authorJohn Resig <jeresig@gmail.com>
Wed, 13 Oct 2010 00:56:46 +0000 (20:56 -0400)
committerJohn Resig <jeresig@gmail.com>
Wed, 13 Oct 2010 00:56:46 +0000 (20:56 -0400)
src/event.js
test/unit/event.js

index 1bbf134..8a40d00 100644 (file)
@@ -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 );
index b37b253..6f75322 100644 (file)
@@ -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." );
 });
 
 /*