[ticket/243] Remove msie check as it's not supported anymore and fix call

B3P-243
This commit is contained in:
Marc Alexander
2014-11-02 15:34:24 +01:00
parent 2d40c6060a
commit 05777c0812
2 changed files with 7 additions and 16 deletions

View File

@@ -10,21 +10,12 @@
var scrollbarWidth = 0; var scrollbarWidth = 0;
$.getScrollbarWidth = function() { $.getScrollbarWidth = function() {
if ( !scrollbarWidth ) { if ( !scrollbarWidth ) {
if ( $.browser.msie ) { var $div = $('<div />')
var $textarea1 = $('<textarea cols="10" rows="2"></textarea>') .css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000 })
.css({ position: 'absolute', top: -1000, left: -1000 }).appendTo('body'), .prependTo('body').append('<div />').find('div')
$textarea2 = $('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>') .css({ width: '100%', height: 200 });
.css({ position: 'absolute', top: -1000, left: -1000 }).appendTo('body'); scrollbarWidth = 100 - $div.width();
scrollbarWidth = $textarea1.width() - $textarea2.width(); $div.parent().remove();
$textarea1.add($textarea2).remove();
} else {
var $div = $('<div />')
.css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000 })
.prependTo('body').append('<div />').find('div')
.css({ width: '100%', height: 200 });
scrollbarWidth = 100 - $div.width();
$div.parent().remove();
}
} }
return scrollbarWidth; return scrollbarWidth;
}; };

View File

@@ -23,7 +23,7 @@ phpbb.b3p_fix_right_column_margin = function() {
var $portal_left = $('#portal-left'); var $portal_left = $('#portal-left');
var $portal_center = $('#portal-center'); var $portal_center = $('#portal-center');
if (width <= 895) { if (width <= (895 - $.getScrollbarWidth())) {
// Get height of left and center column // Get height of left and center column
var right_height = $portal_right.height(); var right_height = $portal_right.height();
var left_height = $portal_left.height(); var left_height = $portal_left.height();