Index: Source/core/editing/TypingCommand.cpp |
diff --git a/Source/core/editing/TypingCommand.cpp b/Source/core/editing/TypingCommand.cpp |
index d3b8864706f026488af592b08d9999d04a4b9d24..47830a99e7d67baf690af586b3c3494656ccbd2b 100644 |
--- a/Source/core/editing/TypingCommand.cpp |
+++ b/Source/core/editing/TypingCommand.cpp |
@@ -390,8 +390,7 @@ bool TypingCommand::makeEditableRootEmpty() |
return false; |
if (root->firstChild() == root->lastChild()) { |
- Element* firstElementChild = ElementTraversal::firstWithin(*root); |
- if (isHTMLBRElement(firstElementChild)) { |
+ if (isHTMLBRElement(root->firstChild())) { |
// If there is a single child and it could be a placeholder, leave it alone. |
if (root->renderer() && root->renderer()->isRenderBlockFlow()) |
return false; |