X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=c826f17b14fcec3522803525f59221be1649a736;hb=d431519d61f55af8bd1714d00126c948d888f3a9;hp=c28e3704f9cfb319a974ac389dc651ceb5a698ef;hpb=366039a6f05ffa09630e95be604e3f4f26a33bd6;p=jquery.git diff --git a/src/event.js b/src/event.js index c28e370..c826f17 100644 --- a/src/event.js +++ b/src/event.js @@ -57,6 +57,12 @@ jQuery.event = { handle = jQuery.data( elem, "handle", eventHandle ); } + // If no handle is found then we must be trying to bind to one of the + // banned noData elements + if ( !handle ) { + return; + } + // Add elem as a property of the handle function // This is to prevent a memory leak with non-native // event in IE. @@ -910,7 +916,7 @@ function liveConvert( type, selector ) { return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "&")].join("."); } -jQuery.each( ("blur focus load resize scroll unload click dblclick " + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { @@ -919,8 +925,8 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " + return fn ? this.bind( name, fn ) : this.trigger( name ); }; - if ( jQuery.fnAttr ) { - jQuery.fnAttr[ name ] = true; + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; } });