mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Merge pull request #19775 from twbs/modal-ie8-innerWidth
Modal: Remove IE8-specific window.innerWidth workaround
This commit is contained in:
commit
8c678e9db7
@ -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…
x
Reference in New Issue
Block a user