Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index b64ad9188e41876adfbc062c9ba58453894c622b..db53835595470c6b7163ac43d6556b9eab517852 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -1551,6 +1551,11 @@ void Browser::BeforeUnloadFired(WebContents* web_contents, |
} |
bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { |
+ // Navigations in background tabs shouldn't change the focus state of the |
+ // omnibox, since it's associated with the foreground tab. |
+ if (source != tab_strip_model_->GetActiveWebContents()) |
+ return false; |
+ |
const content::NavigationEntry* entry = |
source->GetController().GetActiveEntry(); |
if (entry) { |