Don't parse TEXTAREA child nodes (Edge bug)

This commit is contained in:
Niklas von Hertzen 2017-08-05 21:40:22 +08:00
parent 12672839f1
commit 0224592a96

View File

@ -69,6 +69,8 @@ const parseNodeTree = (
// $FlowFixMe
inlineSelectElement(childNode, container);
}
const SHOULD_TRAVERSE_CHILDREN = childNode.tagName !== 'TEXTAREA';
const treatAsRealStackingContext = createsRealStackingContext(
container,
childNode
@ -86,10 +88,14 @@ const parseNodeTree = (
treatAsRealStackingContext
);
parentStack.contexts.push(childStack);
parseNodeTree(childNode, container, childStack, imageLoader);
if (SHOULD_TRAVERSE_CHILDREN) {
parseNodeTree(childNode, container, childStack, imageLoader);
}
} else {
stack.children.push(container);
parseNodeTree(childNode, container, stack, imageLoader);
if (SHOULD_TRAVERSE_CHILDREN) {
parseNodeTree(childNode, container, stack, imageLoader);
}
}
}
}