commit 82d9b36d9399466f1c33f6a0834d8addd890049a
parent b6d18f87e8c50058d34853e3fb90f9365bd2a8d6
Author: Cristina Horotan <chorotan@mozilla.com>
Date: Wed, 8 Oct 2025 23:06:24 +0300
Revert "Bug 1991916 - Fix first load for backup header in about:preferences. r=mconley" for causing bc failures on browser_bug731866.js
This reverts commit d8c1fa704b3bf8a77d8f33d418554375e310f53a.
Diffstat:
2 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/browser/components/preferences/sync.inc.xhtml b/browser/components/preferences/sync.inc.xhtml
@@ -243,24 +243,21 @@
target="_blank"
data-l10n-id="sync-connect-another-device"/>
</vbox>
-</vbox>
+ </vbox>
</deck>
<!-- Firefox Backup -->
-<vbox id="dataBackupSection" data-category="paneSync" data-hidden-from-search="true">
- <hbox id="backupCategory"
+<hbox id="backupCategory"
class="subcategory"
hidden="true"
- data-category="paneSync"
- >
- <html:h1 data-l10n-id="settings-data-backup-header"/>
- </hbox>
- <groupbox id="dataBackupGroup"
- data-subcategory="backup"
- hidden="true">
- <label class="search-header" hidden="true"><html:h2 data-l10n-id="settings-data-backup-header"/></label>
- <hbox flex="1">
- <html:backup-settings />
- </hbox>
- </groupbox>
-</vbox>
+ data-category="paneSync">
+ <html:h1 data-l10n-id="settings-data-backup-header"/>
+</hbox>
+<groupbox id="dataBackupGroup" data-category="paneSync"
+ data-subcategory="backup" hidden="true"
+ data-hidden-from-search="true">
+ <label class="search-header" hidden="true"><html:h2 data-l10n-id="settings-data-backup-header"/></label>
+ <hbox flex="1">
+ <html:backup-settings />
+ </hbox>
+ </groupbox>
</html:template>
diff --git a/browser/components/preferences/sync.js b/browser/components/preferences/sync.js
@@ -39,6 +39,12 @@ var gSyncPane = {
.getElementById("weavePrefsDeck")
.removeAttribute("data-hidden-from-search");
+ if (Services.prefs.getBoolPref(BACKUP_UI_ENABLED_PREF, false)) {
+ document
+ .getElementById("dataBackupGroup")
+ .removeAttribute("data-hidden-from-search");
+ }
+
this.updateBackupUIVisibility();
// If the Service hasn't finished initializing, wait for it.
@@ -298,13 +304,6 @@ var gSyncPane = {
false
);
- let dataBackupSectionEl = document.getElementById("dataBackupSection");
-
- dataBackupSectionEl.toggleAttribute(
- "data-hidden-from-search",
- !isBackupUIEnabled
- );
-
let dataBackupGroupEl = document.getElementById("dataBackupGroup");
let backupGroupHeaderEl = document.getElementById("backupCategory");
@@ -318,14 +317,11 @@ var gSyncPane = {
this.updateBackupUIVisibility
);
- window.addEventListener(
- "unload",
- () =>
- Services.prefs.removeObserver(
- BACKUP_UI_ENABLED_PREF,
- this.updateBackupUIVisibility
- ),
- { once: true }
+ window.addEventListener("unload", () =>
+ Services.prefs.removeObserver(
+ BACKUP_UI_ENABLED_PREF,
+ this.updateBackupUIVisibility
+ )
);
},