2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Merge pull request #19775 from twbs/modal-ie8-innerWidth

Modal: Remove IE8-specific window.innerWidth workaround
This commit is contained in:
Chris Rebert
2016-04-21 12:24:52 -07:00
+1 -7
View File
@@ -408,13 +408,7 @@ const Modal = (($) => {
}
_checkScrollbar() {
let fullWindowWidth = 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._isBodyOverflowing = document.body.clientWidth < window.innerWidth
this._scrollbarWidth = this._getScrollbarWidth()
}