Bug 1568440 - Prevent Account Central loading again if it is already loading or loaded. r=jorgk DONTBUILD
--- a/mail/base/content/folderDisplay.js
+++ b/mail/base/content/folderDisplay.js
@@ -1700,21 +1700,23 @@ FolderDisplayWidget.prototype = {
/**
* Cause the displayDeck to display the (preference configurable) account
* central page.
*/
_showAccountCentral() {
var accountBox = document.getElementById("accountCentralBox");
document.getElementById("displayDeck").selectedPanel = accountBox;
var prefName = "mailnews.account_central_page.url";
- // oh yeah, 'pref' is a global all right.
var acctCentralPage =
Services.prefs.getComplexValue(prefName,
Ci.nsIPrefLocalizedString).data;
- window.frames.accountCentralPane.location.href = acctCentralPage;
+ // Prevent a second load if necessary.
+ if (window.frames.accountCentralPane.location.href != acctCentralPage) {
+ window.frames.accountCentralPane.location.href = acctCentralPage;
+ }
},
/**
* Call this when the tab using us is being hidden.
*/
makeInactive() {
// - things to do before we mark ourselves inactive (because they depend on
// us being active)