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 // $FlowFixMe
inlineSelectElement(childNode, container); inlineSelectElement(childNode, container);
} }
const SHOULD_TRAVERSE_CHILDREN = childNode.tagName !== 'TEXTAREA';
const treatAsRealStackingContext = createsRealStackingContext( const treatAsRealStackingContext = createsRealStackingContext(
container, container,
childNode childNode
@ -86,10 +88,14 @@ const parseNodeTree = (
treatAsRealStackingContext treatAsRealStackingContext
); );
parentStack.contexts.push(childStack); parentStack.contexts.push(childStack);
parseNodeTree(childNode, container, childStack, imageLoader); if (SHOULD_TRAVERSE_CHILDREN) {
parseNodeTree(childNode, container, childStack, imageLoader);
}
} else { } else {
stack.children.push(container); stack.children.push(container);
parseNodeTree(childNode, container, stack, imageLoader); if (SHOULD_TRAVERSE_CHILDREN) {
parseNodeTree(childNode, container, stack, imageLoader);
}
} }
} }
} }