Skip to content

Commit 350a549

Browse files
committed
Fix check for isBodyOverflowing
1 parent 1d59417 commit 350a549

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/modal/helpers/modal-manager.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ const ModalManager = /*#__PURE__*/ Vue.extend({
139139
}
140140
},
141141
checkScrollbar() {
142-
// Determine if the body element is overflowing
143-
const { left, right } = getBCR(document.body)
144-
this.isBodyOverflowing = left + right < window.innerWidth
142+
const overflowStyle = getCS(document.body).overflowY
143+
this.isBodyOverflowing =
144+
(overflowStyle === 'auto' || overflowStyle === 'scroll') &&
145+
document.body.scrollHeight > document.body.clientHeight
145146
},
146147
setScrollbar() {
147148
const body = document.body

0 commit comments

Comments
 (0)