Index: third_party/WebKit/Source/core/editing/Editor.cpp |
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp |
index 1e9f98c766d924d34c6a3084b3716a6c9677b110..b91f815bdb8f86a64e1c4eff09fdee1d8aa0b753 100644 |
--- a/third_party/WebKit/Source/core/editing/Editor.cpp |
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp |
@@ -736,7 +736,9 @@ void Editor::clearLastEditCommand() { |
} |
Element* Editor::findEventTargetFrom(const VisibleSelection& selection) const { |
- Element* target = associatedElementOf(selection.start()); |
+ Element* target = selection.hasEditableStyle() |
+ ? associatedElementOf(selection.start()) |
+ : frame().document()->activeElement(); |
if (!target) |
target = frame().document()->body(); |