From b41176ce7908a3c9b962d0502560f624cf319f27 Mon Sep 17 00:00:00 2001 From: azaozz Date: Fri, 25 Nov 2011 17:33:31 +0000 Subject: [PATCH] Revert [19264] to keep back-compat. Any improperly fired window.unload will have to be dealt with on a case by case basis. git-svn-id: http://svn.automattic.com/wordpress/trunk@19451 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/thickbox/thickbox.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js index ea5b7980b..9419c5c5c 100644 --- a/wp-includes/js/thickbox/thickbox.js +++ b/wp-includes/js/thickbox/thickbox.js @@ -275,10 +275,7 @@ function tb_showIframe(){ function tb_remove() { jQuery("#TB_imageOff").unbind("click"); jQuery("#TB_closeWindowButton").unbind("click"); - jQuery("#TB_window").fadeOut("fast",function(){ // see #19189 - jQuery(this).triggerHandler("unload"); - jQuery('#TB_window,#TB_overlay,#TB_HideSelect').unbind().remove(); - }); + jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); jQuery("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 jQuery("body","html").css({height: "auto", width: "auto"});