Skip to content

bug(expansion): expansion panel breaks when quickly closing panels using keyboard commands #27430

Closed
@wagnermaciel

Description

@wagnermaciel

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 a mat-expansion-panel has tabbable elements in it's panel content, the mat-expansion-panel will break if a user attempts to quickly close and tab away from a panel after closing (easily reproduced using space + tab)

Reproduction

StackBlitz link: https://stackblitz.com/edit/dgbfpa-3pq8m8?file=src%2Fexample%2Fexpansion-overview-example.html
Steps to reproduce:

  1. Tab to the first expansion panel
  2. Quickly try to close all of the expansion panels using keyboard commands (space + tab)

Expected Behavior

You successfully close the expansion panels

Actual Behavior

The expansion panels are closed but in a broken state

Environment

  • Angular: 16.1.1
  • CDK/Material: 16.1.4
  • Browser: Chrome
  • Operating System: macOs

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions