]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Modal: Remove IE8-specific window.innerWidth workaround 19775/head
authorChris Rebert <code@chrisrebert.com>
Thu, 21 Apr 2016 08:15:22 +0000 (01:15 -0700)
committerChris Rebert <code@chrisrebert.com>
Thu, 21 Apr 2016 08:15:24 +0000 (01:15 -0700)
[skip validator]

js/src/modal.js

index 202c5fe94ca5f3da85a0e0e7b0254c45823381c7..e2365aca7907556d8cc84f3b625742176f8f0231 100644 (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()
     }