From 0de5b7682b463ee40f0d0a3632759c2ff93dd7f5 Mon Sep 17 00:00:00 2001 From: Khushil Mistry Date: Tue, 20 Oct 2020 10:54:06 +1300 Subject: [PATCH] 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 --- mailnews/base/prefs/content/accountUtils.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/mailnews/base/prefs/content/accountUtils.js b/mailnews/base/prefs/content/accountUtils.js index 3ca9617e68..1dfa11b4e9 100644 --- a/mailnews/base/prefs/content/accountUtils.js +++ b/mailnews/base/prefs/content/accountUtils.js @@ -294,11 +294,7 @@ function MsgAccountManager(selectPage, aServer) { // and the selected page, reload the tab and switch to the tab. for (let tabInfo of tabmail.tabInfo) { let tab = tabmail.getTabForBrowser(tabInfo.browser); - if ( - tab && - tab.urlbar && - tab.urlbar.textContent == "about:accountsettings" - ) { + if (tab && tab.urlbar && tab.urlbar.value == "about:accountsettings") { tab.browser.contentDocument.documentElement.server = aServer; tab.browser.contentDocument.documentElement.selectPage = selectPage; tab.browser.contentWindow.onLoad(); @@ -320,11 +316,7 @@ function MsgAccountManager(selectPage, aServer) { for (let tabInfo of tabmail.tabInfo) { let tab = tabmail.getTabForBrowser(tabInfo.browser); - if ( - tab && - tab.urlbar && - tab.urlbar.textContent == "about:accountsettings" - ) { + if (tab && tab.urlbar && tab.urlbar.value == "about:accountsettings") { tab.tabNode.setAttribute("type", "accountManager"); break; }