From 38ddbaca4eeecf4fa9d4db6a332c853a9d041667 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 12 Nov 2011 06:48:04 +0000 Subject: [PATCH] Thickbox: do .triggerHandler() instead of .trigger(), props duck_, fixes #19189 git-svn-id: https://develop.svn.wordpress.org/trunk@19264 602fd350-edb4-49c9-b593-d223f7449a82 --- 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"});