-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
When the input used for searching is part of a form with other fields,
its very easy to use the Enter
to select an option, but then also to press Enter
and submit the whole form,
which I did accidentally many times.
data-autocomplete-submit-on-enter-value="false" - does not do what I would expect.
input[type="text" data-autocomplete-target="input" data-action="keydown.enter->autocomplete#bad"]
class CustomAutocomplete extends Autocomplete {
bad(e) {
e.preventDefault()
}
}
application.register('autocomplete', CustomAutocomplete)
This worked for me.
bufordtaylor and kinduff
Metadata
Metadata
Assignees
Labels
No labels