2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Change check for dynamic modal

This commit is contained in:
GeoSot
2021-10-08 02:46:11 +03:00
committed by XhmikosR
parent fc33ce4b46
commit 92e664c921
+2 -2
View File
@@ -200,8 +200,8 @@ class Modal extends BaseComponent {
} }
_showElement(relatedTarget) { _showElement(relatedTarget) {
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { // try to append dynamic modal
// Don't move modal's DOM position if (!document.body.contains(this._element)) {
document.body.append(this._element) document.body.append(this._element)
} }