0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Use getBoundingClientRect instead of jQuery

This commit is contained in:
David Bailey 2017-08-28 18:55:45 +01:00
parent 2725acc9e5
commit 3f2a8db471

View File

@ -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()
}