| Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| index 03772a7b444d0c8704633a5c36e56cc5c05b2ec2..66a9a55b8e74cfe059d63f33ad99451066c4b8c7 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| @@ -2033,9 +2033,12 @@ static bool EnabledVisibleSelectionAndMark(LocalFrame& frame,
|
|
|
| static bool EnableCaretInEditableText(LocalFrame& frame,
|
| Event* event,
|
| - EditorCommandSource) {
|
| + EditorCommandSource source) {
|
| frame.GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| + if (source == kCommandFromMenuOrKeyBinding &&
|
| + !frame.Selection().SelectionHasFocus())
|
| + return false;
|
| const VisibleSelection& selection =
|
| frame.GetEditor().SelectionForCommand(event);
|
| return selection.IsCaret() && selection.IsContentEditable();
|
|
|