Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 79779a84e0..d327a56dc4 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);
});