Skip to content

bug(cdk/dialog): Closed observable not emitting when closed by navigation #26581

@mpo-dev

Description

@mpo-dev

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

The closed observable is not emitting when the CDK dialog is being closed by navigation when the closeOnNavigation: true property is applied. As a side effect of the dialog not properly closing, the dialog ref is also kept in the Dialog.openDialogs list.

Reproduction

Steps to reproduce:

  1. Open a CDK dialog with closeOnNavigation: true
  2. Navigate away

Expected Behavior

The dialog to close properly

Actual Behavior

The closed observable is not emtting and the dialog is being kept in de list with open dialogs

Environment

  • Angular: 15.1.0
  • CDK/Material: 15.1.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions