diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-09-03 13:56:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-03 13:56:04 +0300 |
commit | e04e42d08c059732153ff6925fa712464cf12207 (patch) | |
tree | a4c5d188bf8416fe7b801fbac79a2ad21af7012e /js/src/modal.js | |
parent | 45baa15932dd9c546c4618acca0b02d6f661e657 (diff) | |
parent | 2e5f1e22860a892f5abdbb65abc14172e0129c1a (diff) |
Merge branch 'v4-dev' into fix-jumping-modal-on-resize
Diffstat (limited to 'js/src/modal.js')
-rw-r--r-- | js/src/modal.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 5892ed0451..689e93bc15 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -1,3 +1,4 @@ +import $ from 'jquery' import Util from './util' @@ -8,7 +9,7 @@ import Util from './util' * -------------------------------------------------------------------------- */ -const Modal = (($) => { +const Modal = (() => { /** @@ -428,7 +429,8 @@ const Modal = (($) => { } _checkScrollbar() { - this._isBodyOverflowing = document.body.clientWidth < window.innerWidth + const rect = document.body.getBoundingClientRect() + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth this._scrollbarWidth = this._getScrollbarWidth() } |