mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 152278, opening a groupmark shouldn't load about:blank into the active tab. r=blake sr=jag
This commit is contained in:
parent
44fc502eda
commit
5990fee38b
@ -226,6 +226,17 @@ function goHelpMenu( url )
|
|||||||
window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
|
window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTopWin()
|
||||||
|
{
|
||||||
|
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
||||||
|
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
|
||||||
|
var topWindowOfType = windowManagerInterface.getMostRecentWindow( "navigator:browser" );
|
||||||
|
|
||||||
|
if (topWindowOfType) {
|
||||||
|
return topWindowOfType;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
function openTopWin( url )
|
function openTopWin( url )
|
||||||
{
|
{
|
||||||
@ -248,20 +259,14 @@ function openTopWin( url )
|
|||||||
url = "about:blank";
|
url = "about:blank";
|
||||||
}
|
}
|
||||||
|
|
||||||
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
|
var topWindowOfType = getTopWin();
|
||||||
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
|
|
||||||
|
|
||||||
var topWindowOfType = windowManagerInterface.getMostRecentWindow( "navigator:browser" );
|
|
||||||
if ( topWindowOfType )
|
if ( topWindowOfType )
|
||||||
{
|
{
|
||||||
topWindowOfType.focus();
|
topWindowOfType.focus();
|
||||||
topWindowOfType.loadURI(url);
|
topWindowOfType.loadURI(url);
|
||||||
return topWindowOfType;
|
return topWindowOfType;
|
||||||
}
|
}
|
||||||
else
|
return window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
|
||||||
{
|
|
||||||
return window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function goAboutDialog()
|
function goAboutDialog()
|
||||||
|
@ -1872,9 +1872,14 @@
|
|||||||
else
|
else
|
||||||
urlValue = "about:blank";
|
urlValue = "about:blank";
|
||||||
|
|
||||||
w = openTopWin(urlValue);
|
if (groupTarget) {
|
||||||
if (groupTarget)
|
w = getTopWin();
|
||||||
|
w.focus();
|
||||||
w.OpenBookmarkGroupFromResource(this.currentRes, this.db, this.rdf);
|
w.OpenBookmarkGroupFromResource(this.currentRes, this.db, this.rdf);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
openTopWin(urlValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (aEvent)
|
if (aEvent)
|
||||||
aEvent.preventBubble();
|
aEvent.preventBubble();
|
||||||
|
Loading…
Reference in New Issue
Block a user