diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 18:50:39 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 18:50:39 +0000 |
commit | 2f69fb592e7ecf34868b037c003eb28e1591f34d (patch) | |
tree | 24ec0e8218a5482cb487d4875c6b1023d7458c0c /chrome/browser/browser.cc | |
parent | b354e984cacb1d5dc8678b7f971ccade87f59e3e (diff) | |
download | chromium_src-2f69fb592e7ecf34868b037c003eb28e1591f34d.zip chromium_src-2f69fb592e7ecf34868b037c003eb28e1591f34d.tar.gz chromium_src-2f69fb592e7ecf34868b037c003eb28e1591f34d.tar.bz2 |
Fix onblur= handelers getting called on popup window creation. This regressed in r5417.
ISSUE=http://crbug.com/4737
Review URL: http://codereview.chromium.org/13271
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 5 |
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() { |