From 3e9d98233c2c9a6ce5eb1f5384c9a99e1b90a6a4 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Mon, 19 May 2025 19:11:49 +0200 Subject: [PATCH] fix: Fixed restoring tabs not showing the separator correctly, b=(no-bug), c=workspaces --- src/zen/workspaces/ZenWorkspace.mjs | 6 +++++- src/zen/workspaces/ZenWorkspaces.mjs | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/zen/workspaces/ZenWorkspace.mjs b/src/zen/workspaces/ZenWorkspace.mjs index 5c24fd827..7e48a2f0e 100644 --- a/src/zen/workspaces/ZenWorkspace.mjs +++ b/src/zen/workspaces/ZenWorkspace.mjs @@ -88,7 +88,11 @@ this.scrollbox._canScrollToElement = (element) => { if (gBrowser.isTab(element)) { - return !element.hasAttribute('zen-essential') || !this.hasAttribute('positionpinnedtabs'); + return ( + !element.hasAttribute('zen-essential') && + !this.hasAttribute('positionpinnedtabs') && + !element.hasAttribute('zen-empty-tab') + ); } return true; }; diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 762059c6f..13ca5d02b 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2600,7 +2600,10 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature { forAnimation = false; } for (const entry of entries) { - const originalWorkspaceId = entry.target.getAttribute('zen-workspace-id'); + let originalWorkspaceId = entry.target.getAttribute('zen-workspace-id'); + if (!originalWorkspaceId) { + originalWorkspaceId = entry.target.closest('zen-workspace')?.id; + } const workspacesIds = []; if (entry.target.closest('#zen-essentials')) { // Get all workspaces that have the same userContextId