]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Avoid bad scrollbar replacement into width values (#30690)
authorJohann-S <johann.servoire@gmail.com>
Wed, 29 Apr 2020 19:28:20 +0000 (21:28 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Apr 2020 19:28:20 +0000 (22:28 +0300)
js/src/modal.js

index 0daa428a8dfeeb5c021cb4ecf46f0c713701aa9e..19561122ffbf8cb244a4849e29d88e69661b4c53 100644 (file)
@@ -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()
   }