From 2eeba14b306a57a3ef17a4b4decf4654495d4f81 Mon Sep 17 00:00:00 2001 From: core-devops Date: Sat, 13 Jun 2026 00:02:12 -0700 Subject: [PATCH] fix(canvas-chat): reset textarea to baseline (not 0px) after send (core#2697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The auto-grow send-reset set the textarea's inline height to "0px" and never recomputed, so after sending the input collapsed to just its padding — far smaller than its original single-row size — until the next keystroke fired the onChange recompute. Clear the inline height instead (empty string) so the rows={1} natural height governs again, restoring the baseline immediately on send. Co-Authored-By: Claude Fable 5 --- canvas/src/components/tabs/ChatTab.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/canvas/src/components/tabs/ChatTab.tsx b/canvas/src/components/tabs/ChatTab.tsx index a9425324..1726e8a5 100644 --- a/canvas/src/components/tabs/ChatTab.tsx +++ b/canvas/src/components/tabs/ChatTab.tsx @@ -354,10 +354,15 @@ function MyChatPanel({ workspaceId, data }: Props) { if ((!text && files.length === 0) || !agentReachable || uploading) return; setInput(""); setPendingFiles([]); - // Reset auto-grow height so the textarea collapses back to a - // single row after a send (core#2697). + // Reset auto-grow height so the textarea returns to its baseline + // single-row size after a send (core#2697). CLEAR the inline height + // (don't set "0px") — an empty string drops the imperative override + // so the `rows={1}` natural height governs again. Setting "0px" here + // collapsed the textarea to just its padding (no recompute fires + // until the next keystroke), leaving the input far smaller than its + // original size. if (textareaRef.current) { - textareaRef.current.style.height = "0px"; + textareaRef.current.style.height = ""; textareaRef.current.style.overflowY = "hidden"; } clearSendError(); -- 2.52.0