Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto focus chat input #2998

Merged
merged 1 commit into from
May 1, 2023
Merged

Auto focus chat input #2998

merged 1 commit into from
May 1, 2023

Conversation

notmd
Copy link
Collaborator

@notmd notmd commented May 1, 2023

I decided to only focus on desktop since it is bad practice to auto-focus on mobile, the keyboard on mobile take a lot space, but let's see how the user feedback with it

const ref = useRef(null);

return (maybeRef || ref) as RefObject<T>;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand what this does?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbdBarho you can read more about it here https://mtsknn.fi/blog/react-fallback-ref

@notmd notmd merged commit 49cde84 into main May 1, 2023
@notmd notmd deleted the auto_focus_chat_input branch May 1, 2023 18:01
layterz pushed a commit to layterz/Open-Assistant that referenced this pull request May 11, 2023
I decided to only focus on desktop since it is bad practice to
auto-focus on mobile, the keyboard on mobile take a lot space, but let's
see how the user feedback with it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants