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

Unified Diff: content/browser/renderer_host/input/touch_selection_controller_client_aura.cc

Issue 2124913002: Fix long press touch selection on empty text fields (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EmptyTextfield -> ClearTextfield Created 4 years, 5 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
diff --git a/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc b/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
index 4508e28fa3601c13cd7012da57e8bd4522b94e6a..1bf91a5447060e31afbc5159cc7474d592c4993d 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
@@ -156,8 +156,11 @@ void TouchSelectionControllerClientAura::OnScrollCompleted() {
bool TouchSelectionControllerClientAura::HandleContextMenu(
const ContextMenuParams& params) {
- if (params.source_type == ui::MENU_SOURCE_TOUCH && params.is_editable &&
- params.selection_text.empty() && IsQuickMenuAvailable()) {
+ if (params.source_type == ui::MENU_SOURCE_LONG_PRESS &&
+ rwhva_->selection_controller()->insertion_active_or_requested() &&
+ IsQuickMenuAvailable()) {
+ DCHECK(params.is_editable);
+ DCHECK(params.selection_text.empty());
quick_menu_requested_ = true;
UpdateQuickMenu();
return true;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698