Skip to content

bug(matAutocomplete): Autocomplete not opening with shadow DOM #30611

Closed
@diesenj

Description

@diesenj

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using Angular’s ViewEncapsulation.ShadowDom, the MatAutocomplete component fails to reopen the list of options after an option has been selected.
This issue has already been reported, but it still appears to be unresolved in Angular 19 + Material 19: #30153

Workarounds:

  • Pressing an additional key (e.g., arrow key) after typing causes it to open.
  • Triggering a blur and then refocusing the input also makes it work again.

The provided Stackblitz demo app shows the behaviour of MatAutocomplete with and without ViewEncapsulation.ShadowDom.

Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-rzrzwrx7
Steps to reproduce:

  1. Type "One"
  2. Select "One"
  3. Type "Two"

Expected Behavior

MatAutocomplete should reopen the list of options immediately on typing, even after a previous selection, without requiring additional key presses or focus shifts.

Actual Behavior

When typing, MatAutocomplete component fails to reopen the list of options (after an option has been selected).

Environment

  • Angular: 19
  • CDK/Material: 19

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocomplete

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions