From 7c1bdbfa681e37fd4fc0b826f5ff0b8ed3c4dd1a Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Sat, 17 May 2025 23:29:25 +0200 Subject: [PATCH] fix: Fixed rearranging tabs from pinned to normal, b=(no-bug), c=workspaces --- src/zen/workspaces/ZenWorkspaces.mjs | 8 +++++--- src/zen/workspaces/zen-workspaces.css | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 84ab4025b..9f1eba7c7 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2539,13 +2539,15 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature { } async updateTabsContainers(target = undefined, forAnimation = false) { - if (target && !target.parentNode) { + if (target && !target.target?.parentNode) { target = null; } // Only animate if it's from an event - const animateContainer = target && target instanceof EventTarget; + const animateContainer = target && target.target instanceof EventTarget; await this.onPinnedTabsResize( - [{ target: target ?? this.pinnedTabsContainer }], + // This is what happens when we join a resize observer, an event listener + // while using it as a method. + [{ target: (target?.target ? target.target : target) ?? this.pinnedTabsContainer }], forAnimation, animateContainer ); diff --git a/src/zen/workspaces/zen-workspaces.css b/src/zen/workspaces/zen-workspaces.css index 9b7aee08a..1faa67e50 100644 --- a/src/zen/workspaces/zen-workspaces.css +++ b/src/zen/workspaces/zen-workspaces.css @@ -527,6 +527,11 @@ zen-workspace { scrollbar-color: var(--vertical-tabs-scrollbar-color); overflow-y: auto; } + + &, + & .zen-workspace-normal-tabs-section { + height: 100%; + } } }