Skip to content

Commit

Permalink
Fix some gaps in the handling of event data properties. Thanks to @ji…
Browse files Browse the repository at this point in the history
…tter in ff6cead for the catches.
  • Loading branch information
jeresig committed Oct 13, 2010
1 parent 9ced9f2 commit 783bb2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/event.js
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion test/unit/event.js
Expand Up @@ -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." );
}); });


/* /*
Expand Down

0 comments on commit 783bb2a

Please sign in to comment.