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

Unified Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 1305153004: Focus comes on the 'close button' in find bar when selecting 'Enter' key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 4 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 | chrome/browser/ui/views/find_bar_views_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_view.cc
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 816e93d3c310c6dc39b6dfd3dbc187ed04f957ef..ac33df91d8976fbcecadfcfce7297bc7159dfd69 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -406,14 +406,8 @@ void FindBarView::ButtonPressed(
sender->tag() == FIND_NEXT_TAG,
false); // Not case sensitive.
}
- if (event.IsMouseEvent()) {
- // If mouse event, we move the focus back to the text-field, so that the
- // user doesn't have to click on the text field to change the search. We
- // don't want to do this for keyboard clicks on the button, since the
- // user is more likely to press FindNext again than change the search
- // query.
- find_text_->RequestFocus();
- }
+ // Move focus to the find textfield.
+ find_text_->RequestFocus();
break;
case CLOSE_TAG:
find_bar_host()->GetFindBarController()->EndFindSession(
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_views_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698