From: David Bailey Date: Mon, 28 Aug 2017 17:55:45 +0000 (+0100) Subject: Use getBoundingClientRect instead of jQuery X-Git-Tag: v4.0.0-beta.2~299^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f2a8db4711e420b48b7a5b4c36f158a1b9eabab;p=thirdparty%2Fbootstrap.git Use getBoundingClientRect instead of jQuery --- diff --git a/js/src/modal.js b/js/src/modal.js index c8c7e3d217..0306b4e873 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() }