summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docshell/base/nsDocShell.cpp4
-rw-r--r--modules/libpref/init/all.js4
2 files changed, 7 insertions, 1 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 8eca47495..f4840297d 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -12281,7 +12281,9 @@ nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI)
return false;
}
- if (buf.EqualsLiteral("blank") || buf.EqualsLiteral("newtab")) {
+ if (buf.EqualsLiteral("blank") || buf.EqualsLiteral("logopage") ||
+ (buf.EqualsLiteral("newtab") &&
+ !Preferences::GetBool("browser.newtabpage.add_to_session_history", false))) {
return false;
}
}
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index 6eddfe7a2..1a67293e4 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -247,6 +247,10 @@ pref("dom.compartment_per_addon", true);
// of content viewers to cache based on the amount of available memory.
pref("browser.sessionhistory.max_total_viewers", -1);
+// Whether to store 'about:newtab' in the session history, disabled by default.
+// See https://github.com/MoonchildProductions/UXP/issues/719
+pref("browser.newtabpage.add_to_session_history", false);
+
pref("ui.use_native_colors", true);
pref("ui.click_hold_context_menus", false);
// Duration of timeout of incremental search in menus (ms). 0 means infinite.