From d9ab7afca8f82ca004c7116c3ea9b5dbf9609d12 Mon Sep 17 00:00:00 2001 From: AlexRV12 <71396855+AlexRV12@users.noreply.github.com> Date: Thu, 3 Sep 2026 10:21:17 +0200 Subject: [PATCH] fix: move the sliding tab indicator when a tab's own label changes --- frontend/src/lib/components/common/tabs/Tabs.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/common/tabs/Tabs.svelte b/frontend/src/lib/components/common/tabs/Tabs.svelte index b287b12c0a..fb0cdd2299 100644 --- a/frontend/src/lib/components/common/tabs/Tabs.svelte +++ b/frontend/src/lib/components/common/tabs/Tabs.svelte @@ -101,12 +101,15 @@ if (!slidingIndicator || !row) return const ro = new ResizeObserver(measureBar) ro.observe(row) - // The mark moving is the selection changing; a tab added or removed, or one that grows a - // count as its content arrives, changes what the bar has to sit on. + // The mark moving is the selection changing, and a tab added or removed changes what the + // bar has to sit on. Text counts too: a label rewritten in place — a count arriving, + // Result becoming Error — resizes the tab under the bar without touching the tree, and + // Svelte writes it straight to the node, so childList never sees it. const mo = new MutationObserver(measureBar) mo.observe(row, { childList: true, subtree: true, + characterData: true, attributes: true, attributeFilter: ['data-tab-selected'] })