We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e7027e commit fdc7856Copy full SHA for fdc7856
app/javascript/js/controllers/form_controller.js
@@ -2,7 +2,10 @@ import { Controller } from '@hotwired/stimulus'
2
3
// Connects to data-controller="form"
4
export default class extends Controller {
5
- submit() {
+ submit(event) {
6
+ // return if event.key is undefined preventing the form submit on autocomplete event
7
+ if (!event.key) return
8
+
9
this.element.requestSubmit()
10
}
11
0 commit comments