* Use the built-in openUILinkIn method to create a new tab.
Cette révision appartient à :
Anthony Lieuallen 2008-06-28 00:51:02 +00:00
Parent e13b4f7cd7
révision eec12951fd
1 fichiers modifiés avec 1 ajouts et 19 suppressions

Voir le fichier

@ -67,17 +67,6 @@ var resurrect={
return null;
},
// // // // // // // // // // // // // // // // // // // // // // // // // // //
selectTab:function(aTab) {
with (gBrowser) {
selectedTab=aTab;
mTabBox.selectedPanel=getBrowserForTab(mCurrentTab).parentNode;
mCurrentTab.selected=true;
updateCurrentBrowser();
}
},
// // // // // // // // // // // // // // // // // // // // // // // // // // //
showDialog:function(url) {
@ -209,14 +198,7 @@ var resurrect={
if (gotoUrl) {
if (ownerDoc.getElementById('targetTab').getAttribute('selected')) {
var newTab=window.opener.gBrowser.addTab(gotoUrl);
//replicate broken focus-new-tab functionality
var prefServ=Components.classes['@mozilla.org/preferences-service;1']
.getService(Components.interfaces.nsIPrefBranch);
if (!prefServ.getBoolPref('browser.tabs.loadInBackground')) {
window.opener.resurrect.selectTab(newTab);
}
window.opener.openUILinkIn(gotoUrl, 'tab');
} else if (ownerDoc.getElementById('targetWin').getAttribute('selected')) {
// the setTimeout keeps focus from returning to the opener
setTimeout(function(){