From 700d2475f01cad2750c44c5d34f1810550c30549 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 8 Sep 2025 15:43:32 -0700 Subject: [PATCH] resize chat textarea on paste --- .../WorkspaceChat/ChatContainer/PromptInput/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index 2a716aad8c9..8a498f0b350 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -227,6 +227,7 @@ export default function PromptInput({ setTimeout(() => { textarea.selectionStart = textarea.selectionEnd = start + pasteText.length; + adjustTextArea({ target: textarea }); }, 0); } return; @@ -280,7 +281,7 @@ export default function PromptInput({ }} value={promptInput} spellCheck={Appearance.get("enableSpellCheck")} - className={`border-none cursor-text max-h-[50vh] md:max-h-[350px] md:min-h-[40px] mx-2 md:mx-0 pt-[12px] w-full leading-5 md:text-md text-white bg-transparent placeholder:text-white/60 light:placeholder:text-theme-text-primary resize-none active:outline-none focus:outline-none flex-grow ${textSizeClass}`} + className={`border-none cursor-text max-h-[50vh] md:max-h-[350px] md:min-h-[40px] mx-2 md:mx-0 pt-[12px] w-full leading-5 md:text-md text-white bg-transparent placeholder:text-white/60 light:placeholder:text-theme-text-primary resize-none active:outline-none focus:outline-none flex-grow mb-1 ${textSizeClass}`} placeholder={t("chat_window.send_message")} /> {isStreaming ? (