mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-30 12:21:55 +00:00
feat: Fixed issue with workspace changes getting stuck, b=bug #9334, c=common, compact-mode, glance, split-view, tests, workspaces
This commit is contained in:
@@ -2107,7 +2107,13 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
gZenUIManager._preventToolbarRebuild = true;
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}
|
||||
await Promise.all(animations);
|
||||
let promiseTimeout = new Promise((resolve) =>
|
||||
setTimeout(resolve, kGlobalAnimationDuration * 1000 + 50)
|
||||
);
|
||||
// See issue https://github.com/zen-browser/desktop/issues/9334, we need to add
|
||||
// some sort of timeout to the animation promise, just in case it gets stuck.
|
||||
// We are doing a race between the timeout and the animations finishing.
|
||||
await Promise.race([Promise.all(animations), promiseTimeout]).catch(console.error);
|
||||
document.documentElement.removeAttribute('animating-background');
|
||||
if (shouldAnimate) {
|
||||
for (const cloned of clonedEssentials) {
|
||||
|
||||
Reference in New Issue
Block a user