From 7904f3264a071c89408b97e689d02626353a376e Mon Sep 17 00:00:00 2001 From: Andrey Bochkarev <50177704+octaviusz@users.noreply.github.com> Date: Thu, 9 Jul 2026 02:36:51 +0300 Subject: [PATCH] gh-13870: Remove two spaces cycling (gh-14529) --- src/zen/spaces/ZenSpaceManager.mjs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index b4b087e2b..a91982554 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -1774,11 +1774,6 @@ class nsZenWorkspaces { } const newTransform = diff * 100; element.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`; - // A special case for two spaces - if (spaceLen === 2 && diff !== 0) { - const side = offsetPixels > 0 ? -100 : 100; - element.style.transform = `translateX(${side + offsetPixels / 2}%)`; - } } // Hide other essentials with different containerTabId for (const container of otherContainersEssentials) { @@ -2009,12 +2004,6 @@ class nsZenWorkspaces { offset += spaceLen; } offset = offset * 100; - // A special case for two spaces - if (spaceLen === 2 && offset !== 0) { - const currentTransform = - parseFloat(element.style.transform.split("(")[1]) || 0; - offset = currentTransform >= 0 ? 100 : -100; - } const newTransform = `translateX(${offset}%)`; // Only animate the workspace that is coming in, to avoid having multiple workspaces // animating off-screen at the same time which can cause performance issues. With an off @@ -2091,17 +2080,6 @@ class nsZenWorkspaces { existingOffset = currentTransform || (isGoingLeft ? -100 : 100); newOffset = 0; } - - if (spaceLen === 2) { - if (containsPrev && !containsNew) { - existingOffset = currentTransform; - newOffset = currentTransform >= 0 ? 100 : -100; - } else { - existingOffset = currentTransform >= 0 ? 100 : -100; - newOffset = 0; - } - } - const newTransform = `translateX(${newOffset}%)`; let existingTransform = `translateX(${existingOffset}%)`; if (shouldAnimate) {