diff --git a/frontend/src/lib/components/chat/ChatInput.svelte b/frontend/src/lib/components/chat/ChatInput.svelte
index 3d9804c..f9ecf5c 100644
--- a/frontend/src/lib/components/chat/ChatInput.svelte
+++ b/frontend/src/lib/components/chat/ChatInput.svelte
@@ -89,6 +89,9 @@
}
onSend?.(content, images);
+
+ // Keep focus on input after sending
+ requestAnimationFrame(() => focusInput());
}
/**
@@ -105,11 +108,18 @@
pendingImages = images;
}
- // Focus textarea on mount
- $effect(() => {
+ /**
+ * Focus the textarea
+ */
+ function focusInput(): void {
if (textareaElement && !disabled) {
textareaElement.focus();
}
+ }
+
+ // Focus textarea on mount
+ $effect(() => {
+ focusInput();
});
@@ -119,7 +129,7 @@
{/if}
@@ -147,14 +157,14 @@
{/if}
-
+