diff --git a/app/frontend/src/components/chatui/InputArea.tsx b/app/frontend/src/components/chatui/InputArea.tsx index 916c183b..9bf81c70 100644 --- a/app/frontend/src/components/chatui/InputArea.tsx +++ b/app/frontend/src/components/chatui/InputArea.tsx @@ -67,6 +67,7 @@ export default function InputArea({ const handleTextAreaInput = (e: React.ChangeEvent) => { setTextInput(e.target.value); + adjustTextareaHeight(); }; const handleKeyPress = (e: React.KeyboardEvent) => { @@ -225,6 +226,12 @@ export default function InputArea({ if (files) handleFileUpload(Array.from(files)); }; + useEffect(() => { + adjustTextareaHeight(); + window.addEventListener("resize", adjustTextareaHeight); + return () => window.removeEventListener("resize", adjustTextareaHeight); + }, [textInput]); + return ( <>