-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdDialog does not close when browser's back or forward button clicked #2601
Comments
This may be tricky to resolve since we don't want to introduce a dependency on |
I think that we could try listening for the pop state event. Will have to check how it plays with stuff like guards. |
@vicb mentioned he might have an idea on how to do this. |
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes angular#2601.
Closes all of the open dialogs when the user goes forwards/backwards in history. Fixes #2601.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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?
The text was updated successfully, but these errors were encountered: