这是indexloc提供的服务,不要输入任何密码
Skip to content

Focus Input on Page Load #44

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

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Focus Input on Page Load #44

merged 1 commit into from
Jun 16, 2023

Conversation

juriadams
Copy link
Contributor

@juriadams juriadams commented Jun 16, 2023

What's changed?

Whenever opening title.sh, you have to press Tab twice to focus the main input. This PR changes this behavior by automatically setting the focus on the input on the first render.

It's worth noting that I first tried using the autoFocus prop on the <AutosizeInput /> component, which unfortunately had no effect.

@vercel
Copy link

vercel bot commented Jun 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
title-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2023 11:13am

@vercel-team
Copy link

📝 Changed routes:

/
Screenshot of /
(view full size)

Commit 994d2a5 (https://title-site-csh8f84m0.vercel.sh).

Copy link

@AndyBitz AndyBitz left a comment

Choose a reason for hiding this comment

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

Thanks!

@AndyBitz AndyBitz merged commit 572e8bb into vercel:main Jun 16, 2023
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.

3 participants