From: Johann-S Date: Wed, 29 Apr 2020 19:28:20 +0000 (+0200) Subject: Avoid bad scrollbar replacement into width values (#30690) X-Git-Tag: v5.0.0-alpha1~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85c4788dedfdec7d681829e3a52ada0c33f8fa8e;p=thirdparty%2Fbootstrap.git Avoid bad scrollbar replacement into width values (#30690) --- 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() }