From 3c8e893cab216eb1f748ec1245aeb059a1349639 Mon Sep 17 00:00:00 2001 From: David Luzar <5153846+dwelle@users.noreply.github.com> Date: Tue, 20 Jan 2026 20:14:28 +0100 Subject: [PATCH] fix: keep input focus during generation (#10679) --- .../TTDDialog/Chat/ChatInterface.tsx | 19 +++++++++++++++---- packages/excalidraw/locales/en.json | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx b/packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx index b26aa9bc70..312c49ac9c 100644 --- a/packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx +++ b/packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx @@ -90,7 +90,9 @@ export const ChatInterface = ({ const handleKeyDown = (event: React.KeyboardEvent) => { if (event.key === KEYS.ENTER && !event.shiftKey) { event.preventDefault(); - handleSubmit(); + if (!isGenerating) { + handleSubmit(); + } } }; @@ -143,7 +145,14 @@ export const ChatInterface = ({
-
+