summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index b630a21..34160db 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -2345,11 +2345,14 @@ void Browser::BuildPopupWindow(TabContents* source,
Browser* browser = new Browser(type, profile_);
browser->set_override_bounds(initial_pos);
browser->CreateBrowserWindow();
+ // We need to Show before AddNewContents, otherwise AddNewContents will focus
+ // it (via BrowserView::TabSelectedAt calling RestoreFocus), triggering any
+ // onblur="" handlers.
+ browser->window()->Show();
// TODO(beng): See if this can be made to use
// TabStripModel::AppendTabContents.
browser->AddNewContents(source, new_contents, NEW_FOREGROUND_TAB,
gfx::Rect(), true);
- browser->window()->Show();
}
GURL Browser::GetHomePage() {