From: Chris Rebert Date: Thu, 21 Apr 2016 08:15:22 +0000 (-0700) Subject: Modal: Remove IE8-specific window.innerWidth workaround X-Git-Tag: v4.0.0-alpha.3~112^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19775%2Fhead;p=thirdparty%2Fbootstrap.git Modal: Remove IE8-specific window.innerWidth workaround [skip validator] --- diff --git a/js/src/modal.js b/js/src/modal.js index 202c5fe94c..e2365aca79 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() }