зеркало из https://github.com/mozilla/pjs.git
Bug 578711 - Opening two copies of 'Tabs from my Other Computers' closes Fennec [r=vingtetun]
This commit is contained in:
Родитель
40de679741
Коммит
ab02cbfb32
|
@ -587,6 +587,17 @@ var BrowserUI = {
|
|||
return tab;
|
||||
},
|
||||
|
||||
newOrSelectTab: function newOrSelectTab(aURI, aOwner) {
|
||||
let tabs = Browser.tabs;
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
if (tabs[i].browser.currentURI.spec == aURI) {
|
||||
Browser.selectedTab = tabs[i];
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.newTab(aURI, aOwner);
|
||||
},
|
||||
|
||||
closeTab : function closeTab(aTab) {
|
||||
// If no tab is passed in, assume the current tab
|
||||
Browser.closeTab(aTab || Browser.selectedTab);
|
||||
|
|
|
@ -48,7 +48,7 @@ let WeaveGlue = {
|
|||
},
|
||||
|
||||
openRemoteTabs: function openRemoteTabs() {
|
||||
this._openTab("about:sync-tabs");
|
||||
BrowserUI.newOrSelectTab("about:sync-tabs", null);
|
||||
},
|
||||
|
||||
connect: function connect() {
|
||||
|
@ -80,10 +80,6 @@ let WeaveGlue = {
|
|||
addEventListener("unload", function() addRem(false), false);
|
||||
},
|
||||
|
||||
_openTab: function _openTab(url) {
|
||||
setTimeout(function() BrowserUI.newTab(url), 0);
|
||||
},
|
||||
|
||||
get _settings() {
|
||||
// Do a quick test to see if the options exist yet
|
||||
let syncButton = document.getElementById("sync-syncButton");
|
||||
|
|
Загрузка…
Ссылка в новой задаче