Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
index e8eb453d76839e49a7a01538684714985bd0bef8..4664abec80bcbd229fd60e0babfc8a6d29dcd9b5 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -1818,7 +1818,7 @@ WebInputEventResult EventHandler::SendContextMenuEventForKey( |
selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start(); |
VisualViewport& visual_viewport = frame_->GetPage()->GetVisualViewport(); |
- if (!override_target_element && start.AnchorNode() && |
+ if (!override_target_element && start.AnchorNode() && !selection.IsHidden() && |
(selection.ComputeVisibleSelectionInDOMTreeDeprecated() |
.RootEditableElement() || |
selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) { |