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
Press Enter
key on AutoComplete submits the form
#10861
Comments
Yes, enter on the field should submit, but not on the option. To better understand please have a look at this simple form. The AutoComplete is the same as a Select (they share a lot of their code). In the form above
At this point, after one key press, the form is not submitted, but the option two is selected. If you want to submit the form you have to press enter again. The AutoComplete behaves differently because on the first enter press submits the form |
Try reinstall node_modules |
wow, thanks, very quick |
Version
3.6.2
Environment
Any browser
Reproduction link
https://ant.design/components/form/#components-form-demo-register
Steps to reproduce
In the demo page there's a form with autocomplete (Website)
What is expected?
I expect the option to be selected but the form should not be submitted
What is actually happening?
The form is submitted, you can see that the form is submitted because all fields are now in red
Is there a way to prevent submit when the select dropdown is open?
The text was updated successfully, but these errors were encountered: