diff options
author | Mario <mario@mariovavti.com> | 2021-02-15 18:41:44 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-02-15 18:41:44 +0000 |
commit | e8c2e17bc901ab139377e759f5ef931f8649b8c1 (patch) | |
tree | bebbeae1760c0cb5b5dea88fb268153a38938fab /vendor/twbs/bootstrap/js/src/modal.js | |
parent | 6fae291cc8ec69a74d0c1673186b3d8f319378d4 (diff) | |
download | volse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.tar.gz volse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.tar.bz2 volse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.zip |
compser update twbs/bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/modal.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/src/modal.js | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/vendor/twbs/bootstrap/js/src/modal.js b/vendor/twbs/bootstrap/js/src/modal.js index 975a20be6..2e3017024 100644 --- a/vendor/twbs/bootstrap/js/src/modal.js +++ b/vendor/twbs/bootstrap/js/src/modal.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.5.3): modal.js + * Bootstrap (v4.6.0): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ import Util from './util' */ const NAME = 'modal' -const VERSION = '4.5.3' +const VERSION = '4.6.0' const DATA_KEY = 'bs.modal' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' @@ -230,39 +230,35 @@ class Modal { } _triggerBackdropTransition() { - if (this._config.backdrop === 'static') { - const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED) + const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED) - $(this._element).trigger(hideEventPrevented) - if (hideEventPrevented.isDefaultPrevented()) { - return - } + $(this._element).trigger(hideEventPrevented) + if (hideEventPrevented.isDefaultPrevented()) { + return + } - const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight + const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight - if (!isModalOverflowing) { - this._element.style.overflowY = 'hidden' - } + if (!isModalOverflowing) { + this._element.style.overflowY = 'hidden' + } - this._element.classList.add(CLASS_NAME_STATIC) + this._element.classList.add(CLASS_NAME_STATIC) - const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog) - $(this._element).off(Util.TRANSITION_END) + const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog) + $(this._element).off(Util.TRANSITION_END) - $(this._element).one(Util.TRANSITION_END, () => { - this._element.classList.remove(CLASS_NAME_STATIC) - if (!isModalOverflowing) { - $(this._element).one(Util.TRANSITION_END, () => { - this._element.style.overflowY = '' - }) - .emulateTransitionEnd(this._element, modalTransitionDuration) - } - }) - .emulateTransitionEnd(modalTransitionDuration) - this._element.focus() - } else { - this.hide() - } + $(this._element).one(Util.TRANSITION_END, () => { + this._element.classList.remove(CLASS_NAME_STATIC) + if (!isModalOverflowing) { + $(this._element).one(Util.TRANSITION_END, () => { + this._element.style.overflowY = '' + }) + .emulateTransitionEnd(this._element, modalTransitionDuration) + } + }) + .emulateTransitionEnd(modalTransitionDuration) + this._element.focus() } _showElement(relatedTarget) { @@ -400,7 +396,11 @@ class Modal { return } - this._triggerBackdropTransition() + if (this._config.backdrop === 'static') { + this._triggerBackdropTransition() + } else { + this.hide() + } }) if (animate) { |