fix: reset input height on submission (#679)

This commit is contained in:
Jeremy 2025-01-08 17:00:38 +05:30 committed by GitHub
parent 3e34d678b3
commit 7a189743a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,6 +81,13 @@ function PureMultimodalInput({
} }
}; };
const resetHeight = () => {
if (textareaRef.current) {
textareaRef.current.style.height = 'auto';
textareaRef.current.style.height = '98px';
}
};
const [localStorageInput, setLocalStorageInput] = useLocalStorage( const [localStorageInput, setLocalStorageInput] = useLocalStorage(
'input', 'input',
'', '',
@ -119,6 +126,7 @@ function PureMultimodalInput({
setAttachments([]); setAttachments([]);
setLocalStorageInput(''); setLocalStorageInput('');
resetHeight();
if (width && width > 768) { if (width && width > 768) {
textareaRef.current?.focus(); textareaRef.current?.focus();