fix: restore textarea focus after sending a message
This commit is contained in:
@@ -87,9 +87,10 @@ export function MessageInput({ channelId, channelName }: MessageInputProps) {
|
|||||||
setContent('');
|
setContent('');
|
||||||
setFiles([]);
|
setFiles([]);
|
||||||
|
|
||||||
// Reset textarea height
|
// Reset textarea height and re-focus
|
||||||
if (textareaRef.current) {
|
if (textareaRef.current) {
|
||||||
textareaRef.current.style.height = 'auto';
|
textareaRef.current.style.height = 'auto';
|
||||||
|
textareaRef.current.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear typing timeout
|
// Clear typing timeout
|
||||||
|
|||||||
Reference in New Issue
Block a user