Skip to content

Commit

Permalink
feat(chat): auto focus on chat input on first page load (Issue #3051) (
Browse files Browse the repository at this point in the history
…#3108)

Co-authored-by: Magomed-Elbi Dzhukalaev <[email protected]>
Co-authored-by: Ilya Bondar <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2025
1 parent b93e913 commit e0c0591
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/chat/src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,12 @@ export const ChatView = memo(() => {
(isModelsInstalled || isReplay || isIsolatedView) &&
!(isConversationWithSchema && selectedConversations.length > 1);

useEffect(() => {
if (textareaRef.current) {
textareaRef.current.focus();
}
}, []);

return (
<div
className="relative min-w-0 shrink grow basis-0 overflow-y-auto"
Expand Down

0 comments on commit e0c0591

Please sign in to comment.