From b9e3576fad40105ef7a20e46ec89399c75ba84a8 Mon Sep 17 00:00:00 2001 From: Tim Disney Date: Wed, 18 Mar 2026 09:21:13 +0000 Subject: [PATCH] clean fab --- .../src/lib/components/ArticleCard.svelte | 52 +++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/ArticleCard.svelte b/frontend/src/lib/components/ArticleCard.svelte index 7f68389..3f5ec6d 100644 --- a/frontend/src/lib/components/ArticleCard.svelte +++ b/frontend/src/lib/components/ArticleCard.svelte @@ -396,6 +396,26 @@ let overflowTriggerRef = $state(null); + // Sticky detection: track whether the action bar is floating (stuck) vs at its natural position + let actionBarSentinelRef = $state(null); + let isActionBarFloating = $state(false); + + $effect(() => { + if (!expanded || !actionBarSentinelRef) { + isActionBarFloating = false; + return; + } + const observer = new IntersectionObserver( + ([entry]) => { + // When the sentinel is visible, the action bar is at its natural position (not floating) + isActionBarFloating = !entry.isIntersecting; + }, + { threshold: 0 } + ); + observer.observe(actionBarSentinelRef); + return () => observer.disconnect(); + }); + function handleOverflowTag(e: MouseEvent) { e.stopPropagation(); overflowMenuOpen = false; @@ -635,6 +655,7 @@
{#if isShareMode} @@ -785,6 +806,7 @@ {/if}
+ {#if expanded}
{/if} {#if tagMenuOpen}