mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Avoid bad scrollbar replacement into width values (#30690)
This commit is contained in:
parent
c06a1f305d
commit
5f00bba652
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user