mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
when opening a link in an existing browser window, focus it to bring it to front, or if minimized, to show it. r/sr=bryner, a=sspitzer
This commit is contained in:
parent
1585c98d26
commit
69934e9004
@ -108,8 +108,10 @@ function openTopBrowserWith(url)
|
||||
var browserWin = windowMediator.getMostRecentWindow("navigator:browser");
|
||||
|
||||
// if there's an existing browser window, open this url in one
|
||||
if (browserWin)
|
||||
if (browserWin) {
|
||||
browserWin.getBrowser().loadURI(url); // Just do a normal load.
|
||||
browserWin.focus();
|
||||
}
|
||||
else
|
||||
window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", url, null, null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user