From e82888daf48ba818d7b1384b3ae4b3e7064291f9 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 6 May 2020 18:14:10 +0300 Subject: [PATCH] Revert "Avoid bad scrollbar replacement into width values (#30690)" This reverts commit 5f00bba6529d53d850a0d24ff0415782c8acebe4. --- js/src/modal.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/src/modal.js b/js/src/modal.js index 8e505eda96..6b80bb2f0d 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -455,11 +455,8 @@ class Modal { } _checkScrollbar() { - const { - left, right - } = document.body.getBoundingClientRect() - - this._isBodyOverflowing = Math.floor(left + right) < window.innerWidth + const rect = document.body.getBoundingClientRect() + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth this._scrollbarWidth = this._getScrollbarWidth() }