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: v4.5.0~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f00bba6529d53d850a0d24ff0415782c8acebe4;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 6b80bb2f0d..8e505eda96 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -455,8 +455,11 @@ 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() }