diff options
author | David Bailey <techdavid@users.noreply.github.com> | 2017-08-28 20:55:45 +0300 |
---|---|---|
committer | David Bailey <techdavid@users.noreply.github.com> | 2017-08-28 20:55:45 +0300 |
commit | 3f2a8db4711e420b48b7a5b4c36f158a1b9eabab (patch) | |
tree | 77c4e974f87051c74e14cbb7e016598dc343b4c4 /js | |
parent | 2725acc9e576059e2dbb3e4722dd5beef84e9215 (diff) |
Use getBoundingClientRect instead of jQuery
Diffstat (limited to 'js')
-rw-r--r-- | js/src/modal.js | 3 |
1 files changed, 2 insertions, 1 deletions
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() } |