Skip to content

Autocomplete enter key incorrectly selects first option when popup is closed #4636

Open
@yanmariomenev

Description

@yanmariomenev

Description

There is an unexpected behavior in the Autocomplete component when interacting with the Enter key after the popup has been closed. Specifically, pressing Enter causes the first option to be selected even though the popup is no longer visible, which is inconsistent with expected behavior.

Steps To Reproduce

  1. Open this StackBlitz example or test it on our online demos.
  2. Focus on the Countries autocomplete input.
  3. Type "a" — the popup will show filtered options like "Albania", "Andorra", etc.
  4. Press Escape to close the popup without selecting any option.
  5. Press Enter twice.
  6. On the second press, the input value changes from "a" to "Albania" unexpectedly.
  7. Alternatively, click outside the input to close the popup, then refocus the input and press Enter — the same issue occurs.

Screenshots or video

Screen.Recording.2025-05-29.at.10.14.15.mov

Actual Behavior

After closing the popup (via Escape key or clicking outside), pressing Enter still selects the first item in the list, as if the popup were open.

Expected Behavior

When the popup is open, pressing Enter should select the highlighted item.
When the popup is closed, pressing Enter should not select any item or change the input value.

Browser

Chrome

Browser version

latest

OS type

MacOS

OS version

No response

Last working version of the Kendo UI for Angular package (if regression).

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions