diff options
Diffstat (limited to 'docs/dist/js/bootstrap.js')
-rw-r--r-- | docs/dist/js/bootstrap.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js index 8b009e0196..c5cf3fd6d9 100644 --- a/docs/dist/js/bootstrap.js +++ b/docs/dist/js/bootstrap.js @@ -1454,7 +1454,7 @@ var Dropdown = (function ($) { this.setAttribute('aria-expanded', 'true'); $(parent).toggleClass(ClassName.OPEN); - $(parent).trigger(Event.SHOWN, relatedTarget); + $(parent).trigger($.Event(Event.SHOWN, relatedTarget)); return false; } @@ -1525,7 +1525,7 @@ var Dropdown = (function ($) { toggles[i].setAttribute('aria-expanded', 'false'); - $(_parent).removeClass(ClassName.OPEN).trigger(Event.HIDDEN, relatedTarget); + $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); } } }, { @@ -1669,6 +1669,7 @@ var Modal = (function ($) { }; var ClassName = { + SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', FADE: 'fade', @@ -1679,7 +1680,7 @@ var Modal = (function ($) { 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' }; /** @@ -2029,7 +2030,7 @@ var Modal = (function ($) { }, { 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 || ''; @@ -2047,7 +2048,7 @@ var Modal = (function ($) { 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); |