Use getBoundingClientRect instead of jQuery
This commit is contained in:
parent
2725acc9e5
commit
3f2a8db471
1 changed files with 2 additions and 1 deletions
|
|
@ -426,7 +426,8 @@ const Modal = (($) => {
|
|||
}
|
||||
|
||||
_checkScrollbar() {
|
||||
this._isBodyOverflowing = $('body').outerWidth(true) < window.innerWidth
|
||||
const rect = document.body.getBoundingClientRect()
|
||||
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth
|
||||
this._scrollbarWidth = this._getScrollbarWidth()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue