Skip to content

Commit 095a5a5

Browse files
committed
Merge pull request mootools#2628 from SergioCrisostomo/replace-feature-detect
replace bad feature detector
2 parents c8e4d54 + 4748bb0 commit 095a5a5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/Element/Element.Dimensions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ element.appendChild(child);
2727
var brokenOffsetParent = (child.offsetParent === element);
2828
element = child = null;
2929

30-
var hasLimitedGetClientBoudingRect = !document.body.getBoundingClientRect().width;
3130
var heightComponents = ['height', 'paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'],
3231
widthComponents = ['width', 'paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'];
3332

@@ -70,7 +69,7 @@ Element.implement({
7069

7170
//<ltIE9>
7271
// This if clause is because IE8- cannot calculate getBoundingClientRect of elements with visibility hidden.
73-
if (hasLimitedGetClientBoudingRect) return {x: this.offsetWidth, y: this.offsetHeight};
72+
if (!window.getComputedStyle) return {x: this.offsetWidth, y: this.offsetHeight};
7473
//</ltIE9>
7574

7675
// This svg section under, calling `svgCalculateSize()`, can be removed when FF fixed the svg size bug.

0 commit comments

Comments
 (0)