From ac807f00fb66a260221f34c74e781558f6addb9c Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 12 Nov 2011 06:48:04 +0000 Subject: [PATCH] Thickbox: do .triggerHandler() instead of .trigger(), props duck_, fixes #19189 git-svn-id: http://svn.automattic.com/wordpress/trunk@19264 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/thickbox/thickbox.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js index 9419c5c5c9..ea5b7980ba 100644 --- a/wp-includes/js/thickbox/thickbox.js +++ b/wp-includes/js/thickbox/thickbox.js @@ -275,7 +275,10 @@ function tb_showIframe(){ function tb_remove() { jQuery("#TB_imageOff").unbind("click"); jQuery("#TB_closeWindowButton").unbind("click"); - jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); + jQuery("#TB_window").fadeOut("fast",function(){ // see #19189 + jQuery(this).triggerHandler("unload"); + jQuery('#TB_window,#TB_overlay,#TB_HideSelect').unbind().remove(); + }); jQuery("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 jQuery("body","html").css({height: "auto", width: "auto"});