Update DOMLazyTree fragments comment to reflect reality
Paul O’Shannessy committed
Mar 11, 2016 at 11:30 UTC
5a17a1ef1d77f0a99cb708adde283275b7eb49fd
1 file changed
+4
-3
src/renderers/dom/client/utils/DOMLazyTree.js
+4
-3
@@ -53,9 +53,10 @@ function insertTreeChildren(tree) {
53
54
var insertTreeBefore = createMicrosoftUnsafeLocalFunction(
55
function(parentNode, tree, referenceNode) {
56
- // Document Fragments in IE11, Edge (and possibly others) won't update
57
- // correctly if they are already inserted. So we have to break out of our
58
- // lazy approach and append children to the fragment before inserting it.
56
+ // DocumentFragments aren't actually part of the DOM after insertion so
57
+ // appending children won't update the DOM. We need to ensure the fragment
58
+ // is properly populated first, breaking out of our lazy approach for just
59
+ // this level.
60
if (tree.node.nodeType === 11) {
61
insertTreeChildren(tree);
62
parentNode.insertBefore(tree.node, referenceNode);