Resize chat textarea on paste (#4369)

resize chat textarea on paste
This commit is contained in:
Sean Hatfield 2025-09-16 16:35:06 -07:00 committed by GitHub
parent 5922349bb7
commit a97b51496d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 ? (