From 44293b3b404937304d68bdaca9b52be809d0d9ca Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Wed, 14 Jan 2026 01:29:31 -0600 Subject: [PATCH] fix(ui): prevent album overlay clicks from navigating --- src/lib/components/AlbumCard.svelte | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/components/AlbumCard.svelte b/src/lib/components/AlbumCard.svelte index d303d49c0..1a405d1b6 100644 --- a/src/lib/components/AlbumCard.svelte +++ b/src/lib/components/AlbumCard.svelte @@ -81,6 +81,15 @@ onPlay?.(); } + function isOverlayAction(target: EventTarget | null) { + return target instanceof HTMLElement && !!target.closest('.action-buttons'); + } + + function handleCardClick(event: MouseEvent) { + if (isOverlayAction(event.target)) return; + onclick?.(); + } + function updateOverflow() { if (titleRef && titleTextRef) { const overflow = titleTextRef.scrollWidth - titleRef.clientWidth; @@ -130,7 +139,7 @@