diff --git a/src/lib/components/Checklist.svelte b/src/lib/components/Checklist.svelte index 07e4c06..3d8cb42 100644 --- a/src/lib/components/Checklist.svelte +++ b/src/lib/components/Checklist.svelte @@ -19,6 +19,7 @@ let { content, onChange }: Props = $props(); + // svelte-ignore state_referenced_locally let items = $state(parseChecklist(content)); let doneExpanded = $state(true); const flipDurationMs = 150; diff --git a/src/lib/components/ImageLightbox.svelte b/src/lib/components/ImageLightbox.svelte index 8369f2b..cd58225 100644 --- a/src/lib/components/ImageLightbox.svelte +++ b/src/lib/components/ImageLightbox.svelte @@ -9,6 +9,8 @@ const { src, alt, onClose }: Props = $props(); + let dialogEl: HTMLDivElement | undefined = $state(); + function handleKeydown(e: KeyboardEvent) { if (e.key === 'Escape') { e.stopPropagation(); @@ -21,14 +23,21 @@ onClose(); } } + + $effect(() => { + dialogEl?.focus(); + }); - - -