[wp-trac] [WordPress Trac] #27473: Thickbox width and height parameters are ignored when using TB_iframe

WordPress Trac noreply at wordpress.org
Fri Mar 21 18:18:20 UTC 2014


#27473: Thickbox width and height parameters are ignored when using TB_iframe
--------------------------+-----------------------------
 Reporter:  harmr         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I tried to load a thickbox with custom width and height parameters, like
 the codex says:
 ?TB_iframe=true&width=450&height=120
 anyway regardsless of what values I use, custom with and height values are
 ignored.
 I debugged /wp-includes/js/thickbox/thickbox.js and parameters are read in
 correctly,
 anyway it does not have any effect when setting them for iframe-tag on
 line 198:

 jQuery("#TB_window").append("<div id='TB_title'><div
 id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a
 href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><div
 class='tb-close-icon'></div></a></div></div><iframe frameborder='0'
 hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent'
 name='TB_iframeContent"+Math.round(Math.random()*1000)+"'
 onload='tb_showIframe()' style='width:"+(ajaxContentW +
 29)+"px;height:"+(ajaxContentH + 17)+"px;'
 >"+thickboxL10n.noiframes+"</iframe>");
 I tried to add the following code to check if resize is possible:

 jQuery("#TB_window").css("width","450");
 jQuery("#TB_window").css("height","120");
 this failed generally (although it worked when executing the command in
 the browser console)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27473>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list