Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2869713003: Make context menu aware of hidden selection (Closed)
Patch Set: Added a test Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() &&
hugoh_UTC2 2017/05/12 10:11:25 I'm wondering if we can't replace this complete st
(selection.ComputeVisibleSelectionInDOMTreeDeprecated()
.RootEditableElement() ||
selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) {

Powered by Google App Engine
This is Rietveld 408576698