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 cf17e1df8c3bfc2248839b3f49db5c00eb7de6c4..b370359ab3bf0239068c6a8ebe2af40b81af12f5 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -1826,7 +1826,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())) { |