[wp-trac] [WordPress Trac] #19189: thickbox.js .trigger("unload") causes conflicts

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 9 12:18:51 UTC 2011


#19189: thickbox.js .trigger("unload") causes conflicts
----------------------------+------------------------
 Reporter:  ocean90         |       Owner:
     Type:  defect (bug)    |      Status:  reviewing
 Priority:  normal          |   Milestone:  3.3
Component:  Administration  |     Version:  3.3
 Severity:  major           |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------

Comment (by GaryJ):

 Having already stumbled across this issue (closing thickbox stopped other
 script actions from working on a theme admin page), I've got the following
 in a theme and I'm getting no new problems on WP 3.3b3:
 {{{

 jQuery('#TB_window, #TB_overlay, #TB_HideSelect').live('mytheme.unload',
 mytheme.thickbox_fix);

 /**
  * Fix the use of unload() when Thickbox window closes.
  *
  * Credit: http://themeforest.net/forums/thread/wordpress-32-admin-area-
 thickbox-triggering-unload-event/46916?page=1#434388
  * More info: http://wordpress.org/support/topic/wp-32-thickbox-jquery-ui-
 tabs-conflict
  *
  * @return {boolean} Returns false
  */
 thickbox_fix: function (event) {
         'use strict';
         event.stopPropagation();
         event.stopImmediatePropagation();
         return false;
 },
 ...
 }}}

 If removing trigger('unload') is not possible, can you at least namespace
 it so it doesn't unload everything else?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19189#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list