AutoComplete: Enter does not submit form #5618
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
There's an issue with the AutoComplete component that affects native behaviour of input fields and form submission.
When attempting to submit a form using the 'Enter' key, the AutoComplete component captures the action and prevents the default behaviour, even when no overlay panel option is in focus.
To improve accessibility and align the AutoComplete component with native browser behaviour, it should not prevent the default action in this scenario. Instead, hitting 'Enter' on an input field should propagate to submitting the form.
When a overlay option foes have focus then 'Enter' should select the focused option rather than submitting.
Reproducer
https://stackblitz.com/edit/auvw5w?file=src%2FApp.vue
PrimeVue version
3.51.0
Vue version
3.x
Language
ALL
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The form should submit and the alert action handler should appear; as it does when you click the button to submit.
The text was updated successfully, but these errors were encountered: