-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[BUG] - Autocomplete don't focus on input #3203
Comments
seems it looks fine in local storybook but not in app. |
Same issue for me, i have autocompletes everywhere in the app 🥲 |
@wingkwong Any temporary solution until it is fixed? |
This still not fixed in v2.4.2 |
@daniel-esserweb Noup, I switched to version 2.2.9 until they fix it |
I dont understand why, in the documentation is working since 2.4.0 i think, but in the application hasn't worked yet |
@daniel-esserweb Me neither, I tried different versions and only 2.29 and below worked for me. |
I do this temporary workaround to get around the autofocus issue, but it would only work for mouse clicks - keyboard users still need to be considered. <Autocomplete
onClick={(event) =>
// @ts-expect-error the input doesn't automatically focus
event.target.focus()
}
>
// ...
</Autocomplete> |
@iPagar Thanks for the report! Screen.Recording.2024-06-18.at.1.09.58.AM.mov |
Just a curiosity, it is very buggy in local development but in production it works fine |
@daniel-esserweb it is due to react strict mode, which only happens in local development. |
@daniel-esserweb Does not work in production as well |
@MarcoRodasW are you using 2.4.2? also can you share a minimal reproducible project? |
NextUI Version
2.4.1
Describe the bug
When I click on autocomplete it should focus on input
Your Example Website or App
https://codesandbox.io/p/sandbox/objective-nash-lff3pt
Steps to Reproduce the Bug or Issue
Expected behavior
Input has to be focused as it shown at https://nextui.org/docs/components/autocomplete#usage
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: