| 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 0997b9633bc2789c5d7012f2c59a019564189db5..c1ca33153dbdef0641c9de722ec421cf18bfc496 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| @@ -2004,9 +2004,13 @@ static bool Enabled(LocalFrame&, Event*, EditorCommandSource) {
|
|
|
| static bool EnabledVisibleSelection(LocalFrame& frame,
|
| Event* event,
|
| - EditorCommandSource) {
|
| + EditorCommandSource source) {
|
| frame.GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| + if (source == kCommandFromMenuOrKeyBinding &&
|
| + !frame.Selection().SelectionHasFocus())
|
| + return false;
|
| +
|
| // The term "visible" here includes a caret in editable text or a range in any
|
| // text.
|
| const VisibleSelection& selection =
|
|
|