Commit 783bb2a8 authored by John Resig's avatar John Resig

Fix some gaps in the handling of event data properties. Thanks to @jitter in...

Fix some gaps in the handling of event data properties. Thanks to @jitter in ff6ceadb for the catches.
parent 9ced9f28
...@@ -286,7 +286,7 @@ jQuery.event = { ...@@ -286,7 +286,7 @@ jQuery.event = {
delete elemData.handle; delete elemData.handle;
if ( typeof elemData === "function" ) { if ( typeof elemData === "function" ) {
jQuery.removeData( elem, "events" ); jQuery.removeData( elem, eventKey );
} else if ( jQuery.isEmptyObject( elemData ) ) { } else if ( jQuery.isEmptyObject( elemData ) ) {
jQuery.removeData( elem ); jQuery.removeData( elem );
......
...@@ -1838,7 +1838,7 @@ test("window resize", function() { ...@@ -1838,7 +1838,7 @@ test("window resize", function() {
ok( true, "Resize event fired." ); ok( true, "Resize event fired." );
}).resize().unbind("resize"); }).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." );
}); });
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment