aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src/modal.js
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /vendor/twbs/bootstrap/js/src/modal.js
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/modal.js')
-rw-r--r--vendor/twbs/bootstrap/js/src/modal.js60
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) {