Pressing Enter/Return key submits form when there is a single MultiSelect and it has focus #2241
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Current behavior
If you have a MultiSelect alone in a form tag and the MultiSelect has focus, pressing "ENTER" will submit the form.
However, if you add a second control AFTER the MultiSelect like a Dropdown, then it will no longer submit when focused and "ENTER" is pressed.
Adding v-on:submit.prevent="" to the form tag doesn't appear to make any difference in the behavior.
Expected behavior
I would expect it to NOT submit in either case.
Minimal reproduction of the problem with instructions
https://codesandbox.io/s/twilight-glitter-3m4p8j?file=/src/App.vue
INSTRUCTIONS:
What is the motivation / use case for changing the behavior?
I'm trying to get consistent behavior across my app. I don't actually want the form to submit at all.
Please tell us about your environment:
Windows 10, VS Code, npm, Vite
Vue version: 3.2.25
PrimeVue version: 3.12.0
Browser:
Firefox 97.0.1 (64-bit), Chrome 98.0.4758.102 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: