diff options
| author | Johann-S <[email protected]> | 2017-09-02 09:09:41 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-02 09:09:41 +0200 |
| commit | 10ff1c70ceacbec6c23bf5c428ebca19009dc6b7 (patch) | |
| tree | 1aea0b75a55ce027c2acfae6e5a5a59f2e45eab1 /js/src | |
| parent | 56e415d57d342d23163346bf41c00479617d5f3a (diff) | |
| parent | 37e105333dace2812cedef88ac2aa31a17b38b66 (diff) | |
| download | bootstrap-10ff1c70ceacbec6c23bf5c428ebca19009dc6b7.tar.xz bootstrap-10ff1c70ceacbec6c23bf5c428ebca19009dc6b7.zip | |
Merge pull request #23718 from techdavid/fix-unwanted-padding-on-modal
Fix unwanted body padding when a modal is opened
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/modal.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 2ff93342d..4068471cd 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -427,7 +427,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() } |
