[wp-trac] [WordPress Trac] #33365: Plugins admin: plugin-install.js prevents custom thickbox implementations

WordPress Trac noreply at wordpress.org
Sun Jun 5 17:00:34 UTC 2016


#33365: Plugins admin: plugin-install.js prevents custom thickbox implementations
--------------------------+-----------------------------------------
 Reporter:  Offereins     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  4.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript, administration
--------------------------+-----------------------------------------

Comment (by ccprog):

 Same is true for [source:trunk/src/wp-admin/js/media-upload.js wp-admin/js
 /media-upload.js] and its use for post.php / post-new.php

 As a partial problem, function tb_position is overwritten to achieve
 responsive sizing of the box. In both cases, the new function assumes the
 existence of `#TB_iframeContent`, but not of `#TB_ajaxContent`. For the
 latter, the static sizing done by thickbox stands and breaks the layout on
 small screens.

 So one solution would be to select both:

 {{{
 $('#TB_iframeContent, #TB_ajaxContent').width(...).height(...);
 }}}

 But then, I am wondering why thickbox sets these sizes for
 `#TB_ajaxContent` anyway. As far as I can see, setting the size is needed
 for iframes, and avoids `width: 100%` as a compatibility measure for IE6
 (is there any other browser with a problem there? Must this still be
 supported?)

 But for a simple `<div id="TB_ajaxContent">`, this is absurd. I'll attach
 a patch for [source:trunk/src/wp-includes/js/thickbox/thickbox.js wp-
 includes/js/thickbox/thickbox.js] that removes the direct styling.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33365#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list