From: Alexander Ebert Date: Wed, 7 Sep 2016 11:35:08 +0000 (+0200) Subject: DocumentFragment.children is not supported in IE X-Git-Tag: 3.0.0_Beta_1~274 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=482871c566a99f8eb5246a90e07b80ec66aed635;p=GitHub%2FWoltLab%2FWCF.git DocumentFragment.children is not supported in IE --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index 8a57c81687..7cfb8ecc7f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -311,7 +311,16 @@ define( DomUtil.setInnerHtml(content, html); } else if (html instanceof DocumentFragment) { - if (html.children[0].nodeName !== 'div' || html.childElementCount > 1) { + var children = [], node; + for (var i = 0, length = html.childNodes.length; i < length; i++) { + node = html.childNodes[i]; + + if (node.nodeType === Node.ELEMENT_NODE) { + children.push(node); + } + } + + if (children[0].nodeName !== 'div' || children.length > 1) { content = elCreate('div'); content.id = id; content.appendChild(html);