X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=cb0b6c29b47638b4bf28afa90196576f0b7cd570;hb=ee52c89dc956dc04d827d70440a089fd0cf94a46;hp=627f4d2a6c838066768cd1a9bc4df885fc91f283;hpb=d5cb977a08156c9945ae7f01fa481c2e2838d8df;p=jquery.git diff --git a/src/event.js b/src/event.js index 627f4d2..cb0b6c2 100644 --- a/src/event.js +++ b/src/event.js @@ -450,7 +450,8 @@ function bindReady(){ } // Prevent memory leaks in IE -if ( jQuery.browser.msie ) - jQuery(window).bind("unload", function() { - $("*").add([document, window]).unbind(); - }); +// And prevent errors on refresh with events like mouseover +// Window isn't included so as not to unbind existing unload events +jQuery(window).bind("unload", function() { + $("*").add(document).unbind(); +});