1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 18:15:30 +02:00

Fixed workspace switching

This commit is contained in:
mr. m 2025-02-13 11:16:16 +01:00
parent 22cc24e9f8
commit ab836eb762
No known key found for this signature in database
GPG key ID: 419302196C23B258
2 changed files with 6 additions and 4 deletions

View file

@ -1627,7 +1627,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
return tabToSelect;
}
async _updateWorkspaceState(window, onInit) {
async _updateWorkspaceState(window, onInit, tabToSelect) {
// Update document state
document.documentElement.setAttribute('zen-workspace-id', window.uuid);
@ -1639,6 +1639,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
gZenUIManager.updateTabsToolbar();
await this._propagateWorkspaceData({ clearCache: false });
gZenThemePicker.onWorkspaceChange(window);
await this._animateTabs(window, !onInit && !this._animatingChange);
gBrowser.selectedTab = tabToSelect;
// Notify listeners
if (this._changeListeners?.length) {
for (const listener of this._changeListeners) {
@ -1646,8 +1651,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
}
await this._animateTabs(window, !onInit && !this._animatingChange);
// Reset bookmarks
this._invalidateBookmarkContainers();