Skip to content

mat-select doesn't select the focused item on tab-keypress #17442

@saithis

Description

@saithis

We switched from an other select implementation to mat-select and now some users are complaining that this is brocken and rightfully pointed out, that the native browser select behaves this way.

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/angular/xevrkjeylnv?file=app%2Fselect-overview-example.ts

Steps to reproduce:

  1. click the basic mat-select
  2. use the arrow down key until "Tacos" is marked
  3. press the tab key

Expected Behavior

I expected "Tacos" to be selected, as this is the behaviour of a native select and also the mat-select with native select.

Actual Behavior

Previous selected value stays selected (or nothing, if nothing was selected)

Environment

  • Angular: 8.2.11
  • CDK/Material: 8.2.1
  • Browser(s): Tested with Firefox and Chrome, but probably all browsers
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

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