Fix for: Fixed issue with wcfDialog() if element is not within the DOM
authorAlexander Ebert <ebert@woltlab.com>
Sun, 24 May 2015 17:44:11 +0000 (19:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 24 May 2015 17:44:11 +0000 (19:44 +0200)
wcfsetup/install/files/js/WCF.js

index e187be33046cf17c383e6195d30a30ab48c51352..5d812a219b69fe9a7b8ef6770f663d884250eead 100755 (executable)
@@ -9166,7 +9166,7 @@ jQuery.fn.extend({
                                }
                        }
                        else {
-                               if (this[0].parentNode === null) {
+                               if (this[0].parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
                                        // if element is not already part of the DOM, UIDialog.open() will fail
                                        document.body.appendChild(this[0]);
                                }