Bug 1668502 - Fix opening per-account settings from context menu or account central may show the wrong account if account settings tab was already open. r=mkmelin

This commit is contained in:
Khushil Mistry 2020-10-20 10:54:06 +13:00
Родитель 7939d2eb16
Коммит 0de5b7682b
1 изменённых файлов: 2 добавлений и 10 удалений

Просмотреть файл

@ -294,11 +294,7 @@ function MsgAccountManager(selectPage, aServer) {
// and the selected page, reload the tab and switch to the tab. // and the selected page, reload the tab and switch to the tab.
for (let tabInfo of tabmail.tabInfo) { for (let tabInfo of tabmail.tabInfo) {
let tab = tabmail.getTabForBrowser(tabInfo.browser); let tab = tabmail.getTabForBrowser(tabInfo.browser);
if ( if (tab && tab.urlbar && tab.urlbar.value == "about:accountsettings") {
tab &&
tab.urlbar &&
tab.urlbar.textContent == "about:accountsettings"
) {
tab.browser.contentDocument.documentElement.server = aServer; tab.browser.contentDocument.documentElement.server = aServer;
tab.browser.contentDocument.documentElement.selectPage = selectPage; tab.browser.contentDocument.documentElement.selectPage = selectPage;
tab.browser.contentWindow.onLoad(); tab.browser.contentWindow.onLoad();
@ -320,11 +316,7 @@ function MsgAccountManager(selectPage, aServer) {
for (let tabInfo of tabmail.tabInfo) { for (let tabInfo of tabmail.tabInfo) {
let tab = tabmail.getTabForBrowser(tabInfo.browser); let tab = tabmail.getTabForBrowser(tabInfo.browser);
if ( if (tab && tab.urlbar && tab.urlbar.value == "about:accountsettings") {
tab &&
tab.urlbar &&
tab.urlbar.textContent == "about:accountsettings"
) {
tab.tabNode.setAttribute("type", "accountManager"); tab.tabNode.setAttribute("type", "accountManager");
break; break;
} }