]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use getBoundingClientRect instead of jQuery
authorDavid Bailey <techdavid@users.noreply.github.com>
Mon, 28 Aug 2017 17:55:45 +0000 (18:55 +0100)
committerDavid Bailey <techdavid@users.noreply.github.com>
Mon, 28 Aug 2017 17:55:45 +0000 (18:55 +0100)
js/src/modal.js

index c8c7e3d2171adb197d733b4186e78f7963e28fb8..0306b4e8734255b159c986646d570e51127ab1cf 100644 (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()
     }