diff --git a/src/zen/common/styles/zen-single-components.css b/src/zen/common/styles/zen-single-components.css index 696ae6100..8a874b8d1 100644 --- a/src/zen/common/styles/zen-single-components.css +++ b/src/zen/common/styles/zen-single-components.css @@ -178,7 +178,7 @@ --tab-border-radius: 6px; --toolbarbutton-border-radius: var(--tab-border-radius); --toolbarbutton-inner-padding: 6px; - --toolbarbutton-outer-padding: 2px; + --toolbarbutton-outer-padding: 1px; color: color-mix(in srgb, currentColor 60%, transparent); transition: @@ -194,10 +194,6 @@ } } -#zen-sidebar-top-buttons toolbarbutton { - padding: 0; -} - .zen-interactive-button { background: color-mix(in srgb, currentColor 6%, transparent) !important; transition: diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 75d3e6a01..b69a56d0f 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -1279,21 +1279,26 @@ class nsZenWindowSync { for (let browser of aBrowsers) { const tab = this.#swapedTabsEntriesForWC.get(browser.permanentKey); if (tab) { - let win = tab.ownerGlobal; - this.log(`Finalizing swap for tab ${tab.id} on window close`); - lazy.TabStateCache.update( - tab.linkedBrowser.permanentKey, - lazy.TabStateCache.get(browser.permanentKey) - ); - let tabData = this.#getTabEntriesFromCache(tab); - let activePageData = tabData.entries[tabData.index - 1] || null; + try { + let win = tab.ownerGlobal; + this.log(`Finalizing swap for tab ${tab.id} on window close`); + lazy.TabStateCache.update( + tab.linkedBrowser.permanentKey, + lazy.TabStateCache.get(browser.permanentKey) + ); + let tabData = this.#getTabEntriesFromCache(tab); + let activePageData = tabData.entries[tabData.index - 1] || null; - // If the page has a title, set it. When doing a swap and we still didn't - // flush the tab state, the title might not be correct. - if (activePageData && win.gBrowser) { - win.gBrowser.setInitialTabTitle(tab, activePageData.title, { - isContentTitle: activePageData.title && activePageData.title != activePageData.url, - }); + // If the page has a title, set it. When doing a swap and we still didn't + // flush the tab state, the title might not be correct. + if (activePageData && win?.gBrowser) { + win.gBrowser.setInitialTabTitle(tab, activePageData.title, { + isContentTitle: activePageData.title && activePageData.title != activePageData.url, + }); + } + } catch (e) { + // We might have already closed the window at this point, so just ignore any error. + console.error(e); } } }