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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 7960001: Fix activation problem when showing bubble view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix OmniboxApiTest.PopupStaysClosed failure Created 9 years, 3 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/test/base/in_process_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 8bdf6ad6ac0a08d454073024920ef2ae39d4f305..09c183d1fb227d2eb52157ca2066ff5ef4f16f0a 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -852,6 +852,11 @@ LocationBar* BrowserView::GetLocationBar() const {
}
void BrowserView::SetFocusToLocationBar(bool select_all) {
+ // Only change focus if this is the active window otherwise we'll end
+ // accidentally deactivating another window.
+ if (!IsActive())
+ return;
+
if (UseCompactNavigationBar()) {
// If focus ever goes to the location bar, we should make sure it is shown
// in compact mode. This includes all accelerators that move focus there.
« no previous file with comments | « no previous file | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698