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

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 232425595c279a63cf8d8db6a3bb6d8310597f78..77258048a403d32c86442ee8a9ebbb987ef9c07a 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -825,28 +825,19 @@ 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);
- break;
+ return false;
case ui::TextEditCommand::MOVE_DOWN:
model()->OnUpOrDownKeyPressed(1);
- break;
+ return false;
case ui::TextEditCommand::PASTE:
OnPaste();
- break;
+ return true;
default:
- Textfield::ExecuteTextEditCommand(command);
- break;
+ return Textfield::ExecuteTextEditCommandImpl(command);
}
}

Powered by Google App Engine
This is Rietveld 408576698