diff --git a/src/components/modal/helpers/modal-manager.js b/src/components/modal/helpers/modal-manager.js index af4e23a9fa0..dd5eacea8e5 100644 --- a/src/components/modal/helpers/modal-manager.js +++ b/src/components/modal/helpers/modal-manager.js @@ -139,9 +139,10 @@ const ModalManager = /*#__PURE__*/ Vue.extend({ } }, checkScrollbar() { - // Determine if the body element is overflowing - const { left, right } = getBCR(document.body) - this.isBodyOverflowing = left + right < window.innerWidth + const overflowStyle = getCS(document.body).overflowY + this.isBodyOverflowing = + (overflowStyle === 'auto' || overflowStyle === 'scroll') && + document.body.scrollHeight > window.innerHeight }, setScrollbar() { const body = document.body