fix(EmptyChatMessageInput): focus on mount

This commit is contained in:
Sharun 2024-11-04 22:00:08 -06:00
parent 1e99fe8d69
commit 7c01d2656e
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ const EmptyChatMessageInput = ({
document.addEventListener('keydown', handleKeyDown); document.addEventListener('keydown', handleKeyDown);
inputRef.current?.focus();
return () => { return () => {
document.removeEventListener('keydown', handleKeyDown); document.removeEventListener('keydown', handleKeyDown);
}; };