diff options
Diffstat (limited to 'docs/dist/js/umd/modal.js')
-rw-r--r-- | docs/dist/js/umd/modal.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/dist/js/umd/modal.js b/docs/dist/js/umd/modal.js index 81ee25306f..0c61f011e0 100644 --- a/docs/dist/js/umd/modal.js +++ b/docs/dist/js/umd/modal.js @@ -74,6 +74,7 @@ }; var ClassName = { + SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', FADE: 'fade', @@ -84,7 +85,7 @@ DIALOG: '.modal-dialog', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', - SCROLLBAR_MEASURER: 'modal-scrollbar-measure' + FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed' }; /** @@ -434,7 +435,7 @@ }, { key: '_setScrollbar', value: function _setScrollbar() { - var bodyPadding = parseInt($(document.body).css('padding-right') || 0, 10); + var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10); this._originalBodyPadding = document.body.style.paddingRight || ''; @@ -452,7 +453,7 @@ value: function _getScrollbarWidth() { // thx d.walsh var scrollDiv = document.createElement('div'); - scrollDiv.className = Selector.SCROLLBAR_MEASURER; + scrollDiv.className = ClassName.SCROLLBAR_MEASURER; document.body.appendChild(scrollDiv); var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); |