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:
authorGeoSot <geo.sotis@gmail.com>2021-10-08 02:46:11 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-11-25 20:23:49 +0300
commit92e664c921ad6b39d9addd7d991a88f3ea6ea7bc (patch)
tree72cdd05846ef3bbb531734e8d71b7b565ce91892
parentfc33ce4b4682edff6ade324bd24abe89f0782158 (diff)
Change check for dynamic modal
-rw-r--r--js/src/modal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 455d395f7a..16181775a1 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -200,8 +200,8 @@ class Modal extends BaseComponent {
}
_showElement(relatedTarget) {
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
- // Don't move modal's DOM position
+ // try to append dynamic modal
+ if (!document.body.contains(this._element)) {
document.body.append(this._element)
}