diff options
| author | Johann-S <[email protected]> | 2017-09-03 12:56:04 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-03 12:56:04 +0200 |
| commit | e04e42d08c059732153ff6925fa712464cf12207 (patch) | |
| tree | a4c5d188bf8416fe7b801fbac79a2ad21af7012e /js/src/modal.js | |
| parent | 45baa15932dd9c546c4618acca0b02d6f661e657 (diff) | |
| parent | 2e5f1e22860a892f5abdbb65abc14172e0129c1a (diff) | |
| download | bootstrap-e04e42d08c059732153ff6925fa712464cf12207.tar.xz bootstrap-e04e42d08c059732153ff6925fa712464cf12207.zip | |
Merge branch 'v4-dev' into fix-jumping-modal-on-resize
Diffstat (limited to 'js/src/modal.js')
| -rw-r--r-- | js/src/modal.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 5892ed045..689e93bc1 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -1,3 +1,4 @@ +import $ from 'jquery' import Util from './util' @@ -8,7 +9,7 @@ import Util from './util' * -------------------------------------------------------------------------- */ -const Modal = (($) => { +const Modal = (() => { /** @@ -428,7 +429,8 @@ const Modal = (($) => { } _checkScrollbar() { - this._isBodyOverflowing = document.body.clientWidth < window.innerWidth + const rect = document.body.getBoundingClientRect() + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth this._scrollbarWidth = this._getScrollbarWidth() } |
