From 6d7938d6e10b7310d040deca2bc5a89514fcdd8a Mon Sep 17 00:00:00 2001 From: eti Date: Mon, 24 Aug 2026 17:19:28 +0200 Subject: [PATCH] web/components: fix ReportDialog default state flash on close Signed-off-by: eti --- web/src/lib/components/moderation/ReportDialog.svelte | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/lib/components/moderation/ReportDialog.svelte b/web/src/lib/components/moderation/ReportDialog.svelte index 73e225f33..154268f16 100644 --- a/web/src/lib/components/moderation/ReportDialog.svelte +++ b/web/src/lib/components/moderation/ReportDialog.svelte @@ -49,10 +49,13 @@ clear(); }); - // resetting on close would swap the panel back to the form while it is still - // fading out, so a sent report waits for the next open to clear itself + // clearing on close would swap the form back in behind the panel while it is + // still fading out, so a sent report keeps its confirmation and resets on the + // way back in + let showing = false; $effect(() => { - if (open && sent) clear(); + if (open && !showing && sent) clear(); + showing = open; }); const submit = createAction(async () => { -- 2.51.2