Skip to content

bug(cdkLayout): BreakpointObserver is broken after closing a dialog #23546

@jcabannes

Description

@jcabannes

Reproduction

Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/angular-r2s6fh?file=src/app/app.component.ts

Steps to reproduce:

  1. Click on child 1
  2. Resize window, you will see the displayed size changing in mat-drawer-content
  3. Click on "Pick one" button
  4. Close dialog
  5. Reisze window, the displayed size does not match the current window size

Expected Behavior

The displayed size in mat-drawer-content should match the current window size

Actual Behavior

The displayed size in mat-drawer-content does not match the current window size

Environment

  • Angular: 12.0.0
  • CDK/Material: 12.2.4
  • Browser(s): Chrome 92.0.4515.107
  • Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu 20.04.3 LTS

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: cdk/layout

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions