TL;DR Question
Why is it that having 2 identical input fields in a form prevents the enter button from submitting the form?
More detailed question
Straight to the point. I'm attempting to use the `enter` button to submit a form when an input element is focused, triggering an event.
- I've created a CodePen to demonstrate this "odd" behavior: https://codepen.io/anon/pen/gqGMmW
As shown in the example, if there are multiple input fields of the same type (e.g., 2 `input="text"`), pressing the `enter` button while focusing on an input fails to emit the `submit` event.
In the second example below, I have the exact same form with the same Vue.js setup, but with only one input field. When you press `enter` while focusing on that element, it correctly emits the submit event.
I've searched online for explanations without much success, aside from generic tips like "prevent form submission on enter".
Even after adding attributes like ID or `name` to the element, the issue persists.
I am not a novice at Vue.js but also not an expert JavaScript user, so straightforward solutions would be greatly appreciated! :D
If additional information is required, please inform me and I'll provide as much detail as possible