aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2016-04-21 12:24:52 -0700
committerChris Rebert <[email protected]>2016-04-21 12:24:52 -0700
commit8c678e9db7e280acdd6cf25de07a3e5cabf12468 (patch)
treec2cef89a30fe82771812089aad54cfbd3f732d2b
parent06b127a8fe9f4d5c907486042b2966a5c5bf0c7a (diff)
parentafdd62d1616f201b19766fc4c63a888690044145 (diff)
downloadbootstrap-8c678e9db7e280acdd6cf25de07a3e5cabf12468.tar.xz
bootstrap-8c678e9db7e280acdd6cf25de07a3e5cabf12468.zip
Merge pull request #19775 from twbs/modal-ie8-innerWidth
Modal: Remove IE8-specific window.innerWidth workaround
-rw-r--r--js/src/modal.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 202c5fe94..e2365aca7 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -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()
}