Skip to content

Commit

Permalink
Change check for dynamic modal
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot authored and XhmikosR committed Nov 25, 2021
1 parent fc33ce4 commit 92e664c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 92e664c

Please sign in to comment.