From 737b6925ab64b431d47b24ed1bb3c450143872d1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 6 May 2020 17:43:51 +0300 Subject: [PATCH] Revert "Avoid bad scrollbar replacement into width values (#30690)" This reverts commit 85c4788dedfdec7d681829e3a52ada0c33f8fa8e. --- js/src/modal.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/src/modal.js b/js/src/modal.js index 19561122ff..0daa428a8d 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -442,9 +442,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() }