feat: Only load about:blank for secondary views when needed, b=no-bug, c=no-component

This commit is contained in:
mr. m
2026-02-21 10:10:05 +01:00
parent 97078b42ac
commit b1ef36c670

View File

@@ -734,7 +734,11 @@ class nsZenWindowSync {
// We do need to do this though instead of just unloading the browser because
// firefox doesn't expect an unloaded + selected tab, so we need to get
// around this limitation somehow.
if (!onClose) {
if (
!onClose &&
(aOtherTab.linkedBrowser?.currentURI.spec !== "about:blank" ||
aOtherTab.hasAttribute("busy"))
) {
this.log(`Loading about:blank in our tab ${aOtherTab.id} before swap`);
aOtherTab.linkedBrowser.loadURI(Services.io.newURI("about:blank"), {
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),