Fix RTL outer width problem.

`offsetWidth` doesn't work for hidden elements.
This commit is contained in:
Hyunje Alex Jun
2015-02-11 15:53:42 +00:00
parent 48eb80bd7f
commit 0acf3602f0
3 changed files with 15 additions and 7 deletions
+8
View File
@@ -53,6 +53,14 @@ exports.removePsClasses = function (element) {
}
};
exports.outerWidth = function (element) {
return this.toInt(d.css(element, 'width')) +
this.toInt(d.css(element, 'paddingLeft')) +
this.toInt(d.css(element, 'paddingRight')) +
this.toInt(d.css(element, 'borderLeftWidth')) +
this.toInt(d.css(element, 'borderRightWidth'));
};
exports.env = {
isWebKit: 'WebkitAppearance' in document.documentElement.style,
supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),