Bug 493527 - Directly change the remember-history pref through the preference element since setting it through the checkbox required multiple attempts. r=jaws
This looks to be happening because the binding for the checkbox may get torn down too fast when a restart is required.
MozReview-Commit-ID: 1y68jMubATx
--- a/browser/components/preferences/in-content-old/privacy.js
+++ b/browser/components/preferences/in-content-old/privacy.js
@@ -326,19 +326,17 @@ var gPrivacyPane = {
updateHistoryModePrefs() {
let pref = document.getElementById("browser.privatebrowsing.autostart");
switch (document.getElementById("historyMode").value) {
case "remember":
if (pref.value)
pref.value = false;
// select the remember history option if needed
- let rememberHistoryCheckbox = document.getElementById("rememberHistory");
- if (!rememberHistoryCheckbox.checked)
- rememberHistoryCheckbox.checked = true;
+ document.getElementById("places.history.enabled").value = true;
// select the remember forms history option
document.getElementById("browser.formfill.enable").value = true;
// select the allow cookies option
document.getElementById("network.cookie.cookieBehavior").value = 0;
// select the cookie lifetime policy option
document.getElementById("network.cookie.lifetimePolicy").value = 0;
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -326,19 +326,17 @@ var gPrivacyPane = {
updateHistoryModePrefs() {
let pref = document.getElementById("browser.privatebrowsing.autostart");
switch (document.getElementById("historyMode").value) {
case "remember":
if (pref.value)
pref.value = false;
// select the remember history option if needed
- let rememberHistoryCheckbox = document.getElementById("rememberHistory");
- if (!rememberHistoryCheckbox.checked)
- rememberHistoryCheckbox.checked = true;
+ document.getElementById("places.history.enabled").value = true;
// select the remember forms history option
document.getElementById("browser.formfill.enable").value = true;
// select the allow cookies option
document.getElementById("network.cookie.cookieBehavior").value = 0;
// select the cookie lifetime policy option
document.getElementById("network.cookie.lifetimePolicy").value = 0;