From d451def561beedf0187e0072f70a888a0ff90729 Mon Sep 17 00:00:00 2001 From: Gyandeep Singh Date: Sun, 17 Apr 2016 18:54:36 -0500 Subject: [PATCH] Update: Big Perf improvement for IE (fixes #199) --- mithril.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index b98d933a..2f66d2cc 100644 --- a/mithril.js +++ b/mithril.js @@ -861,6 +861,9 @@ // set attributes first, then create children var attrs = constructAttrs(data, node, namespace, hasKeys) + // add the node to its parent before attaching children to it + insertNode(parentElement, node, index) + var children = constructChildren(data, node, cached, editable, namespace, configs) @@ -884,7 +887,7 @@ controllers) } - if (isNew || shouldReattach === true && node != null) { + if (!isNew && shouldReattach === true && node != null) { insertNode(parentElement, node, index) }