aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/ListTitle.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-05-22 12:20:37 +0000
committerFuwn <[email protected]>2026-05-22 12:20:37 +0000
commit0d46fa54da625187f96e312fb0bc9f1f0d37aabf (patch)
treed3561752c9dd7b899af10afa3f4e6095c84fc4e5 /src/lib/List/ListTitle.svelte
parentfix(lists): show placeholder while animeLists is undefined (diff)
downloaddue.moe-0d46fa54da625187f96e312fb0bc9f1f0d37aabf.tar.xz
due.moe-0d46fa54da625187f96e312fb0bc9f1f0d37aabf.zip
fix(lists): stop slot buttons from toggling the list details
ListTitle renders inside <summary>, so clicking the Roulette or Refresh button bubbled up and toggled the parent <details>. Wrap the slot in a span that preventDefault()s the click, so the button's own onclick still runs but the summary toggle is cancelled.
Diffstat (limited to 'src/lib/List/ListTitle.svelte')
-rw-r--r--src/lib/List/ListTitle.svelte7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/List/ListTitle.svelte b/src/lib/List/ListTitle.svelte
index 2e9181d0..1af962e5 100644
--- a/src/lib/List/ListTitle.svelte
+++ b/src/lib/List/ListTitle.svelte
@@ -29,7 +29,12 @@ export let hideCount = false;
{/if}
<small class="opaque list-title-time">{time ? time.toFixed(3) : '...'}s</small>
{/if}
- <slot />
+ <span
+ role="presentation"
+ onclick={(event) => event.preventDefault()}
+ >
+ <slot />
+ </span>
{#if progress !== undefined}
<button class="badge unclickable-button button-badge badge-info">
{progress.toFixed(0)}%