mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update DOMLazyTree fragments comment to reflect reality
This commit is contained in:
1 parent
2326d1af9a
commit
5a17a1ef1d
1 file changed
+4
-3
@@ -53,9 +53,10 @@ function insertTreeChildren(tree) {
|
||||
|
||||
var insertTreeBefore = createMicrosoftUnsafeLocalFunction(
|
||||
function(parentNode, tree, referenceNode) {
|
||||
// Document Fragments in IE11, Edge (and possibly others) won't update
|
||||
// correctly if they are already inserted. So we have to break out of our
|
||||
// lazy approach and append children to the fragment before inserting it.
|
||||
// DocumentFragments aren't actually part of the DOM after insertion so
|
||||
// appending children won't update the DOM. We need to ensure the fragment
|
||||
// is properly populated first, breaking out of our lazy approach for just
|
||||
// this level.
|
||||
if (tree.node.nodeType === 11) {
|
||||
insertTreeChildren(tree);
|
||||
parentNode.insertBefore(tree.node, referenceNode);
|
||||
|
||||
Reference in new issue
Block a user