Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2020-04-29 22:28:20 +0300
committerGitHub <noreply@github.com>2020-04-29 22:28:20 +0300
commit85c4788dedfdec7d681829e3a52ada0c33f8fa8e (patch)
tree52c724071a6a728d31fbbb79edbc7cbba7e91ec7 /js
parented2caa5117c43bb967a14827729f89a4203bb47c (diff)
Avoid bad scrollbar replacement into width values (#30690)
Diffstat (limited to 'js')
-rw-r--r--js/src/modal.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 0daa428a8d..19561122ff 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -442,8 +442,9 @@ class Modal {
}
_checkScrollbar() {
- const rect = document.body.getBoundingClientRect()
- this._isBodyOverflowing = rect.left + rect.right < window.innerWidth
+ const { left, right } = document.body.getBoundingClientRect()
+
+ this._isBodyOverflowing = Math.floor(left + right) < window.innerWidth
this._scrollbarWidth = this._getScrollbarWidth()
}