Is this a regression?
The previous version in which this bug was not present was
Angular 18
Description
When a mat-select panel contains a focusable <input> (commonly used to filter options), keyboard navigation behaves differently between Angular Material 18 and 21.
If the select is opened using the keyboard (Enter or Space), pressing ArrowDown or ArrowUp while the input has focus causes the active option to skip every other item.
If the select is opened using the mouse, keyboard navigation behaves as expected.
Expected behavior
Keyboard navigation should behave consistently regardless of how the select was opened.
Reproduction
StackBlitz: https://stackblitz.com/edit/stackblitz-starters-dza4ycd4?file=src%2Fmain.ts
Steps to reproduce:
- Focus the select using the keyboard (Tab).
- Press Enter (or Space) to open it.
- The search input receives focus automatically.
- Press ArrowDown repeatedly.
- Notice that the highlighted option skips every other item.
For comparison:
- Open the same select using the mouse.
- Press ArrowDown.
- Navigation works correctly.
Expected Behavior
After opening the select, pressing ArrowDown or ArrowUp should move the active option by exactly one item at a time, regardless of whether the panel was opened with the keyboard or the mouse.
Actual Behavior
When the select is opened using the keyboard, ArrowDown and ArrowUp skip every other option (for example: Apple → Cherry → Fig).
When the same select is opened using the mouse, navigation behaves correctly.
Environment
Angular: 21.2.18
Angular CDK: 21.2.18
Angular Material: 21.2.18
Regression from:
Angular Material 18.x
Browser:
Chrome (latest)
Operating System:
macOS
Is this a regression?
The previous version in which this bug was not present was
Angular 18
Description
When a
mat-selectpanel contains a focusable<input>(commonly used to filter options), keyboard navigation behaves differently between Angular Material 18 and 21.If the select is opened using the keyboard (
EnterorSpace), pressingArrowDownorArrowUpwhile the input has focus causes the active option to skip every other item.If the select is opened using the mouse, keyboard navigation behaves as expected.
Expected behavior
Keyboard navigation should behave consistently regardless of how the select was opened.
Reproduction
StackBlitz: https://stackblitz.com/edit/stackblitz-starters-dza4ycd4?file=src%2Fmain.ts
Steps to reproduce:
For comparison:
Expected Behavior
After opening the select, pressing ArrowDown or ArrowUp should move the active option by exactly one item at a time, regardless of whether the panel was opened with the keyboard or the mouse.
Actual Behavior
When the select is opened using the keyboard, ArrowDown and ArrowUp skip every other option (for example: Apple → Cherry → Fig).
When the same select is opened using the mouse, navigation behaves correctly.
Environment
Angular: 21.2.18
Angular CDK: 21.2.18
Angular Material: 21.2.18
Regression from:
Angular Material 18.x
Browser:
Chrome (latest)
Operating System:
macOS