From d7e3ae4624c600c2f63168c01adc8970f8369fdb Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Fri, 24 Oct 2025 17:48:03 +0100 Subject: [PATCH] Fix send button not enabling after revert/undo When restoring message text to prompt input after revert/undo, dispatch input event to trigger textarea's onInput handler. This updates the prompt signal and enables the send button immediately. --- src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 20f18e2e..fe5d21a9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -101,6 +101,7 @@ const SessionView: Component<{ const textarea = document.querySelector(".prompt-input") as HTMLTextAreaElement if (textarea) { textarea.value = textParts.map((p: any) => p.text).join("\n") + textarea.dispatchEvent(new Event("input", { bubbles: true })) textarea.focus() } } @@ -469,6 +470,7 @@ const App: Component = () => { const textarea = document.querySelector(".prompt-input") as HTMLTextAreaElement if (textarea) { textarea.value = textParts.map((p: any) => p.text).join("\n") + textarea.dispatchEvent(new Event("input", { bubbles: true })) textarea.focus() } }