no-bug - Only insert cloned essentials if they are going to be animated, c=workspaces, t=chore

This commit is contained in:
mr. m
2025-06-03 18:21:57 +02:00
parent eaa099f9cc
commit 8f06bf21b0

View File

@@ -2133,7 +2133,6 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
originalContainer: essentialsContainer,
repeat: 0,
});
essentialsContainer.parentNode.appendChild(essentialsClone);
for (let i = 0; i < essentialsClone.children.length; i++) {
const child = essentialsClone.children[i];
const originalChild = essentialsContainer.children[i];
@@ -2258,9 +2257,9 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
(isGoingLeft && newWorkspaceIndex > lastWorkspaceIndex) ||
(!isGoingLeft && newWorkspaceIndex < firstWorkspaceIndex)
) {
container.remove();
continue;
}
cloned.originalContainer.parentNode.appendChild(container);
let stepsInBetween =
Math.abs(newWorkspaceIndex - (isGoingLeft ? firstWorkspaceIndex : lastWorkspaceIndex)) +
1;