Modal: Remove IE8-specific window.innerWidth workaround
[skip validator]
This commit is contained in:
parent
06b127a8fe
commit
afdd62d161
|
@ -408,13 +408,7 @@ const Modal = (($) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
_checkScrollbar() {
|
_checkScrollbar() {
|
||||||
let fullWindowWidth = window.innerWidth
|
this._isBodyOverflowing = document.body.clientWidth < window.innerWidth
|
||||||
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
|
|
||||||
let documentElementRect = document.documentElement.getBoundingClientRect()
|
|
||||||
fullWindowWidth =
|
|
||||||
documentElementRect.right - Math.abs(documentElementRect.left)
|
|
||||||
}
|
|
||||||
this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth
|
|
||||||
this._scrollbarWidth = this._getScrollbarWidth()
|
this._scrollbarWidth = this._getScrollbarWidth()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue