Add error handling to tab animation and refine empty tab selection logic

This commit is contained in:
mr. M
2025-03-08 19:43:12 +01:00
parent 441ea2000b
commit 6d164511b4
2 changed files with 32 additions and 28 deletions

View File

@@ -347,6 +347,7 @@ var gZenVerticalTabsManager = {
return visibleTabs[visibleTabs.length - 1] === aTab;
};
try {
const tabSize = aTab.getBoundingClientRect().height;
const transform = `-${tabSize}px`;
gZenUIManager.motion
@@ -374,6 +375,9 @@ var gZenVerticalTabsManager = {
.then(() => {
aTab.querySelector('.tab-stack').style.removeProperty('filter');
});
} catch (e) {
console.error(e);
}
},
get actualWindowButtons() {

View File

@@ -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;