aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-09-02 09:09:41 +0200
committerGitHub <[email protected]>2017-09-02 09:09:41 +0200
commit10ff1c70ceacbec6c23bf5c428ebca19009dc6b7 (patch)
tree1aea0b75a55ce027c2acfae6e5a5a59f2e45eab1 /js/src
parent56e415d57d342d23163346bf41c00479617d5f3a (diff)
parent37e105333dace2812cedef88ac2aa31a17b38b66 (diff)
downloadbootstrap-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.js3
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()
}