aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorDavid Bailey <[email protected]>2017-08-28 18:55:45 +0100
committerDavid Bailey <[email protected]>2017-08-28 18:55:45 +0100
commit3f2a8db4711e420b48b7a5b4c36f158a1b9eabab (patch)
tree77c4e974f87051c74e14cbb7e016598dc343b4c4 /js
parent2725acc9e576059e2dbb3e4722dd5beef84e9215 (diff)
downloadbootstrap-3f2a8db4711e420b48b7a5b4c36f158a1b9eabab.tar.xz
bootstrap-3f2a8db4711e420b48b7a5b4c36f158a1b9eabab.zip
Use getBoundingClientRect instead of jQuery
Diffstat (limited to 'js')
-rw-r--r--js/src/modal.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index c8c7e3d21..0306b4e87 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -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()
}