Skip to content

AutoComplete: Submit form via enter not triggered without selected suggestion #18982

@maxblazhchuk

Description

@maxblazhchuk

Describe the bug

When using inside a form, pressing Enter while the suggestion dropdown is open does not trigger the form’s submit event on the first press. The form only submits on subsequent Enter presses.

Pull Request Link

No response

Other Reason

No response

Reproducer

https://stackblitz.com/edit/ssz34nqa-cdznyful

Environment

Windows OS

Angular version

20.1.4

PrimeNG version

v20

Node version

v22.15.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Click on input
  2. Type untill dropdown appears
  3. Without selecting any option from dropdown, press Enter

Expected behavior

Dropdown closed and submit triggered.

Current behaviour

Dropdown closed and submit not triggere on first Enter press.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions