fix(frontend): restore outside-click dismiss, collapse story groups by default

This commit is contained in:
hh committed 2026-08-06 15:28:10 +02:00
1 parent 004fd56f2c
commit 683b9a31a3
2 files changed
+97 -43

No files matched your search

@@ -1,3 +1,9 @@
<script lang="ts" module>
type PointerHandler = (event: PointerEvent) => void;
const claimed = new WeakSet<Event>();
</script>
<script lang="ts">
import { ContextMenu } from "bits-ui";
import type { Snippet } from "svelte";
@@ -9,8 +15,6 @@
const { children, menu }: Props = $props();
type PointerHandler = (event: PointerEvent) => void;
let open = $state(false);
let suppressClick = false;
@@ -21,7 +25,10 @@
...props,
onpointerdown(event: PointerEvent) {
suppressClick = false;
event.stopPropagation();
if (claimed.has(event)) {
return;
}
claimed.add(event);
onpointerdown(event);
},
onpointerup(event: PointerEvent) {