-
Notifications
You must be signed in to change notification settings - Fork 75
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
Enter key does not submit #157
Comments
I also stumbled across this problem today. I found out that the behavior was changed with version 2.4.0. With version 2.2.0 and 2.3.0 submit via Enter works as usual. With versions 2.4.0 and 2.4.1 it is necessary to set However, there is a regression. Before 2.4.0, |
I solved this problem like this:
|
@keyup solution isn't a good one: Keyup will also trigger when an entry is selected via arrow keys and pressed enter. This will result it two calls. First one with submitAction(entry) for @submit, second one with @submitAction() for keyup. |
I encountered this same issue while using the vanilla JS component. I was using the <form action="/search" method="GET">
<label for="searchInput" class="sr-only">Search</label>
<input class="autocomplete-input" placeholder="Search by name" id="searchInput" name="query"/>
<input type="submit" hidden>
<ul class="autocomplete-result-list"></ul>
</form> No idea if this will continue to work in future versions of the component. |
In my case (v3.0.2) |
When an autocomplete result is highlighted, the documentation suggests hitting Return/Enter will trigger
onSubmit
.I'm using v2.2 for a project and it doesn't appear to do anything (only clicking on a result works as expected). The codepen example in the library's README also doesn't appear to do anything on Enter.
Did this functionality go missing recently?
The text was updated successfully, but these errors were encountered: