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 2920f2a95d137ebc9a1c37ca66968f6d944a76eb..13a9352a54c2bc3ec51d1e664c9500886d716b60 100644 |
--- a/chrome/browser/ui/views/find_bar_view.cc |
+++ b/chrome/browser/ui/views/find_bar_view.cc |
@@ -26,6 +26,7 @@ |
#include "views/background.h" |
#include "views/controls/button/image_button.h" |
#include "views/controls/label.h" |
+#include "views/focus/focus_manager.h" |
#include "views/widget/widget.h" |
// The amount of whitespace to have before the find button. |
@@ -224,6 +225,11 @@ void FindBarView::UpdateForResult(const FindNotificationDetails& result, |
void FindBarView::SetFocusAndSelection(bool select_all) { |
find_text_->RequestFocus(); |
+ // Storing is needed here because the view that has a focus before the wrench |
Finnur
2010/11/15 16:20:30
nit: 'a focus' implies there might be more than on
altimofeev
2010/11/16 14:28:34
Done.
|
+ // menu activation will get the focus just after the wrench menu is closed. |
Finnur
2010/11/15 16:20:30
tiny-nit: 'focus' is enough, 'the focus' is not ne
altimofeev
2010/11/16 14:28:34
Done.
|
+ // FindBar has it's own focus tracker, so it will focus a correct view on |
Finnur
2010/11/15 16:20:30
nit: 'The FindBar'
nit: 'the correct view'
altimofeev
2010/11/16 14:28:34
Done.
|
+ // the close. |
Finnur
2010/11/15 16:20:30
nit: 'the' is not appropriate here (the pendulum h
altimofeev
2010/11/16 14:28:34
Done.
|
+ find_text_->GetFocusManager()->StoreFocusedView(); |
if (select_all && !find_text_->text().empty()) |
find_text_->SelectAll(); |
} |