diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 7b2cff504..f644915ca 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -347,33 +347,37 @@ var gZenVerticalTabsManager = { return visibleTabs[visibleTabs.length - 1] === aTab; }; - const tabSize = aTab.getBoundingClientRect().height; - const transform = `-${tabSize}px`; - gZenUIManager.motion - .animate( - aTab, - { - opacity: [0, 1], - transform: ['scale(0.95)', 'scale(1)'], - marginBottom: isLastTab() ? [] : [transform, '0px'], - }, - { - duration: 0.2, - easing: 'ease-out', - } - ) - .then(() => { - aTab.style.removeProperty('margin-bottom'); - aTab.style.removeProperty('transform'); - aTab.style.removeProperty('opacity'); - }); - gZenUIManager.motion - .animate(aTab.querySelector('.tab-content'), { - filter: ['blur(1px)', 'blur(0px)'], - }) - .then(() => { - aTab.querySelector('.tab-stack').style.removeProperty('filter'); - }); + try { + const tabSize = aTab.getBoundingClientRect().height; + const transform = `-${tabSize}px`; + gZenUIManager.motion + .animate( + aTab, + { + opacity: [0, 1], + transform: ['scale(0.95)', 'scale(1)'], + marginBottom: isLastTab() ? [] : [transform, '0px'], + }, + { + duration: 0.2, + easing: 'ease-out', + } + ) + .then(() => { + aTab.style.removeProperty('margin-bottom'); + aTab.style.removeProperty('transform'); + aTab.style.removeProperty('opacity'); + }); + gZenUIManager.motion + .animate(aTab.querySelector('.tab-content'), { + filter: ['blur(1px)', 'blur(0px)'], + }) + .then(() => { + aTab.querySelector('.tab-stack').style.removeProperty('filter'); + }); + } catch (e) { + console.error(e); + } }, get actualWindowButtons() { diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index f4667a18b..bf9b09240 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -628,7 +628,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { (currentTab.isEmpty && (currentTab.getAttribute('image') === gPageIcons[currentTabURL] || !currentTab.hasAttribute('image'))) || currentTab.hasAttribute('zen-empty-tab') || - currentTab._possibleEmptyTab + (currentTab._possibleEmptyTab && currentTab.isEmpty) ) { this.selectEmptyTab(); this._removedByStartupPage = true;