From d2e0a6feab43ae1daa1e2f095952368548d66f54 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 26 Nov 2011 17:49:50 +0000 Subject: [PATCH] Rename the problematic "unload" event in Thickbox to "tb_unload", making it a true custom event, fixes #19189 git-svn-id: https://develop.svn.wordpress.org/trunk@19456 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/thickbox/thickbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js index 9419c5c5c9..e31b29d370 100644 --- a/wp-includes/js/thickbox/thickbox.js +++ b/wp-includes/js/thickbox/thickbox.js @@ -225,7 +225,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic if(url.indexOf('TB_inline') != -1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); - jQuery("#TB_window").unload(function () { + jQuery("#TB_window").bind('tb_unload', function () { jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); @@ -275,7 +275,7 @@ 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(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_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"});