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

Fix: Search input autofocus #1442

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SeanDemps
Copy link

So the method I've implemented to do this seems a little janky, but it works 🤷‍♂️

I did try to extract the input to it's own component and use the onMount lifecycle hook, but that didn't work either...

9uifranco added a commit to 9uifranco/fireship.io that referenced this pull request Jan 9, 2023
This commit addresses issue fireship-io#1487 by adding a proper autofocus on algolia-search modal. This focus on the input field when user types something for the first time.
Pull requests #fireship-io#1418 add autofocus on search input, but that doesn't seem to be working. Also, this solution produced a warning "Avoid using autofocus".
Pull request fireship-io#1442 also resolves this issue but uses setTimeout to autofocus.
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.

1 participant