mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Add temporary attribute to disable tab animations during workspace changes for smoother transitions
This commit is contained in:
@@ -254,6 +254,10 @@
|
||||
animation-duration: 0.2s;
|
||||
animation-timing-function: ease;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[dont-animate-tabs] & {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-essential='true']):active {
|
||||
|
@@ -1327,6 +1327,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const visibleTabs = new Set();
|
||||
const lastSelectedTab = this._lastSelectedWorkspaceTabs[workspaceUuid];
|
||||
|
||||
this.tabContainer.setAttribute('dont-animate-tabs', 'true');
|
||||
for (const tab of gBrowser.tabs) {
|
||||
const tabWorkspaceId = tab.getAttribute('zen-workspace-id');
|
||||
const isEssential = tab.getAttribute("zen-essential") === "true";
|
||||
@@ -1350,6 +1351,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
gBrowser.hideTab(tab, undefined, true);
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(() => {
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
});
|
||||
|
||||
return visibleTabs;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user