Index: branches/RC/core/admin_templates/js/jquery/thickbox/thickbox.js =================================================================== diff -u -N -r11678 -r11711 --- branches/RC/core/admin_templates/js/jquery/thickbox/thickbox.js (.../thickbox.js) (revision 11678) +++ branches/RC/core/admin_templates/js/jquery/thickbox/thickbox.js (.../thickbox.js) (revision 11711) @@ -540,14 +540,29 @@ vertical: $window.outerHeight() - $window.height() }; + var $top = $(window).scrollTop() + Math.round((pagesize[1] - TB.Height - $borders.vertical) / 2); + var $left = Math.round((pagesize[0] - TB.Width - $borders.horizontal) / 2); + $window.css( { width: TB.Width + 'px', - height: TB.Height + 'px', - left: Math.round((pagesize[0] - TB.Width - $borders.horizontal) / 2) + 'px', - top: $(window).scrollTop() + Math.round((pagesize[1] - TB.Height - $borders.vertical) / 2) + 'px' + height: TB.Height + 'px' } - ) + ); + + if ($left > 0) { + // when something large is opened from right, then we got negative left + // (negative values breaks down "draggable.containment") + $window.css('left', $left + 'px'); + } + + if ($top > 0) { + // when Firebug console is opened from bottom, then we got negative top + // (negative values breaks down "draggable.containment") + $window.css('top', $top + 'px'); + } + + $window .resizable( { alsoResize: '#' + TB.getId('TB_iframeContent'),