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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 2729133005: Fix: Cursor missing in omnibox after entering a alphabet in NTP 'Search box' (Closed)
Patch Set: address comments Created 3 years, 9 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: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 689b651ed518fc723481d9294126be3eee28c176..7fcef80d920f238102ae3f44ab6837a386c11447 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -821,27 +821,22 @@ bool OmniboxViewViews::IsTextEditCommandEnabled(
}
}
-void OmniboxViewViews::ExecuteTextEditCommand(ui::TextEditCommand command) {
- // In the base class, touch text selection is deactivated when a command is
- // executed. Since we are not always calling the base class implementation
- // here, we need to deactivate touch text selection here, too.
- DestroyTouchSelection();
-
- if (!IsTextEditCommandEnabled(command))
- return;
-
+bool OmniboxViewViews::ExecuteTextEditCommandImpl(ui::TextEditCommand command) {
switch (command) {
case ui::TextEditCommand::MOVE_UP:
model()->OnUpOrDownKeyPressed(-1);
+ return false;
sadrul 2017/03/09 01:47:38 I feel like this should be true? (also, below for
yiyix 2017/03/09 02:45:33 Only OnPaste calls OnAfterPossibleChange, that's w
break;
sadrul 2017/03/09 01:47:38 You should remove the break; (here and below)
yiyix 2017/03/09 02:45:33 No break needed after return. Right. I will watch
case ui::TextEditCommand::MOVE_DOWN:
model()->OnUpOrDownKeyPressed(1);
+ return false;
break;
case ui::TextEditCommand::PASTE:
OnPaste();
+ return true;
break;
default:
- Textfield::ExecuteTextEditCommand(command);
+ return Textfield::ExecuteTextEditCommandImpl(command);
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698