| 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..a2d92fe533c3bac52acd09a8402988011de8f6f5 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| @@ -2118,8 +2118,11 @@ static bool EnabledRangeInEditableText(LocalFrame& frame,
|
|
|
| static bool EnabledRangeInRichlyEditableText(LocalFrame& frame,
|
| Event*,
|
| - EditorCommandSource) {
|
| + EditorCommandSource source) {
|
| frame.GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
|
| + if (source == kCommandFromMenuOrKeyBinding &&
|
| + !frame.Selection().SelectionHasFocus())
|
| + return false;
|
| return frame.Selection()
|
| .ComputeVisibleSelectionInDOMTreeDeprecated()
|
| .IsRange() &&
|
|
|