Skip to content

bug(material/dialog): auto-focusing a CSS class doesn't work when animations are disabled #29194

@mmalerba

Description

@mmalerba

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

Auto-focusing a CSS class fails when animations are disabled

Reproduction

StackBlitz link: https://stackblitz.com/edit/yuzht5-trwt8i?file=src%2Fmain.ts
Steps to reproduce:

  1. Open dialog
  2. Focus is not on install button

Expected Behavior

Auto-focusing a CSS class works regardless of animations

Actual Behavior

Auto-focusing a CSS class fails when animations are disabled

Environment

  • Angular: 18.0.0
  • CDK/Material: 18.0.0

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)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