Skip to content

bug(MatSelect): Wrong handling of the esc key #18784

@diegomaninetti

Description

@diegomaninetti

Reproduction

https://stackblitz.com/angular/vrvyeayapjx

Steps to reproduce:

  1. Open the first select "Favourite Food" with mouse or with enter key.
  2. Highlight an option (eg.: "Pizza") using the up/down key.
  3. Hit "escape" key. No value is selected.
  4. Focus out with "tab" key
  5. "Pizza" is now selected.

Expected Behavior

No value is selected.

Actual Behavior

"Pizza" is selected.

Environment

  • Angular: 9.0.6
  • CDK/Material: 9.1.2
  • Browser(s): Chrome 80.0.3987.132 64bit
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions