From 93e2770d6d6b2f68b7972143cecbada171569b1f Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 6 Nov 2024 13:26:29 +0100 Subject: [PATCH] Fix focus on comment component --- src/components/Textarea.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Textarea.svelte b/src/components/Textarea.svelte index 6787306b8..57597cd3a 100644 --- a/src/components/Textarea.svelte +++ b/src/components/Textarea.svelte @@ -58,9 +58,12 @@ textareaElement.style.height = `0px`; textareaElement.style.height = `${textareaElement.scrollHeight}px`; } + }); + + $effect(() => { if (textareaElement && focus) { textareaElement.focus(); - focussed = false; + focus = false; } });