Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index b64ad9188e41876adfbc062c9ba58453894c622b..c994e3d76974f4125dc936bc9518135b8941a024 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -1551,6 +1551,10 @@ void Browser::BeforeUnloadFired(WebContents* web_contents, |
} |
bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { |
+ // Focus if we're going to the NTP, but only if it's in the active tab. |
Peter Kasting
2017/01/12 18:24:04
Nit: This might be clearer as "Navigations in back
Charlie Reis
2017/01/12 19:26:54
Done.
|
+ if (source != tab_strip_model_->GetActiveWebContents()) |
+ return false; |
Peter Kasting
2017/01/12 18:24:04
Does this mean that, when a user switches to a now
Charlie Reis
2017/01/12 19:26:54
Yes, you're right that there's a secondary bug, an
|
+ |
const content::NavigationEntry* entry = |
source->GetController().GetActiveEntry(); |
if (entry) { |