diff options
author | GeoSot <geo.sotis@gmail.com> | 2021-10-08 02:46:11 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2021-11-25 20:23:49 +0300 |
commit | 92e664c921ad6b39d9addd7d991a88f3ea6ea7bc (patch) | |
tree | 72cdd05846ef3bbb531734e8d71b7b565ce91892 | |
parent | fc33ce4b4682edff6ade324bd24abe89f0782158 (diff) |
Change check for dynamic modal
-rw-r--r-- | js/src/modal.js | 4 |
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) } |