diff --git a/src/zen/common/styles/zen-theme.css b/src/zen/common/styles/zen-theme.css index 7d3c987f0..7c26ad91c 100644 --- a/src/zen/common/styles/zen-theme.css +++ b/src/zen/common/styles/zen-theme.css @@ -92,7 +92,11 @@ --in-content-accent-color-active: currentColor !important; /* This is like the secondary button */ - --in-content-button-background: transparent !important; + --in-content-button-background: color-mix( + in srgb, + currentColor, + transparent 90% + ) !important; --in-content-button-text-color: var(--zen-secondary-btn-color) !important; --in-content-button-background-hover: color-mix( in srgb, diff --git a/src/zen/sync/ZenSpacesSyncApplier.sys.mjs b/src/zen/sync/ZenSpacesSyncApplier.sys.mjs index 3fab95ac5..f26135b66 100644 --- a/src/zen/sync/ZenSpacesSyncApplier.sys.mjs +++ b/src/zen/sync/ZenSpacesSyncApplier.sys.mjs @@ -574,7 +574,7 @@ class nsZenSpacesSyncApplier { // An unloaded tab has no live state to lose: retarget its lazy session // state so the next activation loads the new canonical url directly // instead of whatever the tab was created with. - this.#retargetUnloadedTab(win, tab, data); + this.#retargetUnloadedTab(win, tab, data, initial?.entry?.url); } const staticLabel = @@ -621,10 +621,26 @@ class nsZenSpacesSyncApplier { * @param {Window} win * @param {MozTabbrowserTab} tab * @param {object} data + * @param {?string} previousPinUrl - The pin url before this record applied. */ - #retargetUnloadedTab(win, tab, data) { + #retargetUnloadedTab(win, tab, data, previousPinUrl) { try { const state = JSON.parse(win.SessionStore.getTabState(tab)); + const entries = state.entries || []; + let currentUrl = null; + if (entries.length) { + const index = Math.min( + Math.max((state.index || entries.length) - 1, 0), + entries.length - 1 + ); + currentUrl = entries[index]?.url || null; + } + if ( + currentUrl === data.url || + (currentUrl && previousPinUrl && currentUrl !== previousPinUrl) + ) { + return; + } state.entries = [ { url: data.url,