From ee52c89dc956dc04d827d70440a089fd0cf94a46 Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Wed, 14 Nov 2007 15:06:48 +0000 Subject: [PATCH] Fix for #1911 --- src/event.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/event.js b/src/event.js index 627f4d2a6..cb0b6c29b 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(); +}); -- 2.39.5