Skip to content

MdDialog does not close when browser's back or forward button clicked #2601

Closed
@JDillon522

Description

@JDillon522

Bug, feature request, or proposal:

Bug (maybe?)

What is the expected behavior?

When an MdDialog is open and the user clicks the back button the dialog should automatically close.

What is the current behavior?

The dialog stays open.

What are the steps to reproduce?

You can reproduce by launching the documentation example and then clicking back. The dialog stays open. At a minimum, I think it would be a good property set on the MdDialogRef

What is the use-case or motivation for changing an existing behavior?

I can see a use case for keeping it open if you wanted to force user interaction, but I think in general its not a good idea to override UI changes triggered by a browsers back or forward button.

Which versions of Angular, Material, OS, browsers are affected?

angular-cli: 1.0.0-beta.24
node: 6.9.3
os: darwin x64
@angular/common: 2.4.2
@angular/compiler: 2.4.2
@angular/core: 2.4.2
@angular/forms: 2.4.2
@angular/http: 2.4.2
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.2
@angular/platform-browser-dynamic: 2.4.2
@angular/router: 3.4.2
@angular/compiler-cli: 2.4.2

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions