fix: Fixed flashing backgrounds at startup and animating tabs from session restore, b=no-bug, c=common

This commit is contained in:
mr. m
2025-06-09 00:31:33 +02:00
parent 8f6ca03240
commit 872f7bdcbe
2 changed files with 13 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ var gZenUIManager = {
)
).observe(gNavToolbox);
SessionStore.promiseAllWindowsRestored.then(() => {
gZenWorkspaces.promiseInitialized.finally(() => {
this._hasLoadedDOM = true;
this.updateTabsToolbar();
});
@@ -599,7 +599,7 @@ var gZenVerticalTabsManager = {
},
animateTab(aTab) {
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM) {
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM || !aTab.isConnected) {
return;
}
// get next visible tab
@@ -624,7 +624,11 @@ var gZenVerticalTabsManager = {
easing: 'ease-out',
}
)
.then(() => {
.then(() => {})
.catch((err) => {
console.error(err);
})
.finally(() => {
aTab.style.removeProperty('margin-bottom');
aTab.style.removeProperty('transform');
aTab.style.removeProperty('opacity');
@@ -640,7 +644,11 @@ var gZenVerticalTabsManager = {
easing: 'ease-out',
}
)
.then(() => {
.then(() => {})
.catch((err) => {
console.error(err);
})
.finally(() => {
aTab.querySelector('.tab-stack').style.removeProperty('filter');
});
} catch (e) {

View File

@@ -26,7 +26,7 @@
}
}
:root[zen-before-loaded='true'] #browser > *:not(#zen-browser-background, #zen-toast-container),
:root[zen-before-loaded='true'] #browser > *:not(#zen-toast-container),
:root[zen-before-loaded='true'] #urlbar {
opacity: 0 !important;
}