X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=7a10a12cb182a47e19269668a1c08ce6bed54dd1;hb=2866f16c09cce43044d721563a7bdbd9170fb494;hp=c44d7d09d7f83bd13dc9286ff18183a07b9a2946;hpb=79305ed14617488e60416227d7eee70e07fe0c3c;p=jquery.git diff --git a/src/event.js b/src/event.js index c44d7d0..7a10a12 100644 --- a/src/event.js +++ b/src/event.js @@ -809,7 +809,7 @@ if ( !jQuery.support.changeBubbles ) { // Beforeactivate happens also before the previous element is blurred // with this event you can't trigger a change event, but you can store - // information/focus[in] is not needed anymore + // information beforeactivate: function( e ) { var elem = e.target; jQuery.data( elem, "_change_data", getVal(elem) ); @@ -836,6 +836,9 @@ if ( !jQuery.support.changeBubbles ) { }; changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; } function trigger( type, elem, args ) { @@ -1151,7 +1154,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl // More info: // - http://isaacschlueter.com/2006/10/msie-memory-leaks/ if ( window.attachEvent && !window.addEventListener ) { - window.attachEvent("onunload", function() { + jQuery(window).bind("unload", function() { for ( var id in jQuery.cache ) { if ( jQuery.cache[ id ].handle ) { // Try/Catch is to handle iframes being unloaded, see #4280