From 482871c566a99f8eb5246a90e07b80ec66aed635 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 7 Sep 2016 13:35:08 +0200 Subject: [PATCH] DocumentFragment.children is not supported in IE --- .../install/files/js/WoltLabSuite/Core/Ui/Dialog.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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); -- 2.20.1