aboutsummaryrefslogtreecommitdiff
path: root/js/dist/modal.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-09-09 15:01:58 +0300
committerGitHub <[email protected]>2021-09-09 15:01:58 +0300
commite961454738f4033eb2be68bde4b257ea9e0a7765 (patch)
tree507ca252e706a9c692b133b6e18fb8504c488837 /js/dist/modal.js
parent86d5d5ea79e8eaa15a28b9da92bbee53036640f6 (diff)
parent1df098361cac04217d6a464c80e890c4335ecb5c (diff)
downloadbootstrap-main-xmr-docs-render-heading.tar.xz
bootstrap-main-xmr-docs-render-heading.zip
Merge branch 'main' into main-xmr-docs-render-headingmain-xmr-docs-render-heading
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r--js/dist/modal.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js
index 79779a84e..d327a56dc 100644
--- a/js/dist/modal.js
+++ b/js/dist/modal.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap modal.js v5.1.0 (https://getbootstrap.com/)
+ * Bootstrap modal.js v5.1.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -18,7 +18,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/index.js
+ * Bootstrap (v5.1.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -252,7 +252,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/scrollBar.js
+ * Bootstrap (v5.1.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -356,7 +356,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/backdrop.js
+ * Bootstrap (v5.1.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -480,7 +480,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/focustrap.js
+ * Bootstrap (v5.1.1): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -583,7 +583,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): util/component-functions.js
+ * Bootstrap (v5.1.1): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -609,7 +609,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.0): modal.js
+ * Bootstrap (v5.1.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -649,6 +649,7 @@
const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_STATIC = 'modal-static';
+ const OPEN_SELECTOR = '.modal.show';
const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]';
@@ -1014,7 +1015,14 @@
this.focus();
}
});
- });
+ }); // avoid conflict when clicking moddal toggler while another one is open
+
+ const allReadyOpen = SelectorEngine__default['default'].findOne(OPEN_SELECTOR);
+
+ if (allReadyOpen) {
+ Modal.getInstance(allReadyOpen).hide();
+ }
+
const data = Modal.getOrCreateInstance(target);
data.toggle(this);
});