diff options
author | Mario <mario@mariovavti.com> | 2022-10-11 18:18:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-11 18:18:57 +0000 |
commit | 5e5f0aa955d86743a14531bed98501b59140ab1f (patch) | |
tree | f8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/twbs/bootstrap/js/dist/modal.js | |
parent | f9a4c53e3feb07e5319b110b25b4746ae839c420 (diff) | |
download | volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2 volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip |
update composer libs
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/modal.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/modal.js | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/modal.js b/vendor/twbs/bootstrap/js/dist/modal.js index b27d6ab38..dfce5121f 100644 --- a/vendor/twbs/bootstrap/js/dist/modal.js +++ b/vendor/twbs/bootstrap/js/dist/modal.js @@ -1,5 +1,5 @@ /*! - * Bootstrap modal.js v5.2.0 (https://getbootstrap.com/) + * Bootstrap modal.js v5.2.2 (https://getbootstrap.com/) * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -20,7 +20,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.2.0): modal.js + * Bootstrap (v5.2.2): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -39,6 +39,7 @@ const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_RESIZE = `resize${EVENT_KEY}`; + const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`; const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; @@ -231,20 +232,22 @@ } }); EventHandler__default.default.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => { - if (event.target !== event.currentTarget) { - // click is inside modal-dialog - return; - } + // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks + EventHandler__default.default.one(this._element, EVENT_CLICK_DISMISS, event2 => { + if (this._element !== event.target || this._element !== event2.target) { + return; + } - if (this._config.backdrop === 'static') { - this._triggerBackdropTransition(); + if (this._config.backdrop === 'static') { + this._triggerBackdropTransition(); - return; - } + return; + } - if (this._config.backdrop) { - this.hide(); - } + if (this._config.backdrop) { + this.hide(); + } + }); }); } |