Not possible to open second dialog if NoopAnimationsModule is used
Bug, feature request, or proposal:
Bug
What is the expected behavior?
It should be possible to open multiple dialogs even if NoopAnimationsModule is used. It works if BrowserAnimationsModule is used.
What is the current behavior?
If you try to open a second dialog nothing happens
What are the steps to reproduce?
http://plnkr.co/edit/K8SwE9LJeVnVleUic8X3?p=preview
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
[email protected], angular-material@beta-10
Is there anything else we should know?
This pull request looks like a suspect: https://github.com/angular/material2/pull/5769
Do you have any ETA on this ? This issue broke a lot of features in some of our apps and I can't really use BrowserAnimationsModule instead of NoopAnimationsModule because we have to support IE11.
A side effect of this issue is that MdDialog return the wrong MdDialogRef (from the already opened dialog) instead of the one of the new (but not opened) dialog.
@TomDemulierChevret No ETA for this, but the PR that fixes the issue is ready for merge.
@DevVersion Nice. Do you have any idea when it will be merged so I can get the build from https://github.com/angular/material2-builds ? I will build your branch locally for the moment, but it's not a viable solution.
I'm wondering why this issue still happens on EDGE and IE11 even if I import BrowserAnimationsModule?
We are facing the same issue. Opening nested dialog on iOS with BrowserAnimationsModule does not work. the logic inside the open dialog is below.
openDialog() { this.closeDialog(); this.dialog.open(LogInComponent, { height: '100%', width: '100%' }); }
Also, when using NoopAnimationsModule, the dialog.open needs to wrapped inside setTimeout to work on iOS devices.
Kindly assist
Any workaround for this until the PR i merged and released?
This issue getting blocker for us. Any update or workaround??
An update on this would be appreciated.
It is pretty sad that no one will even give an update on this. Last response 22 days ago.
I think they are working on it. See this pull request . https://github.com/angular/material2/pull/8051
Hi, Don't know if it is the answer to the initial question but I ran into the problem of calling MatDialog.open() after I called the MatDialogRef.close(). A second dialog wasn't opened. I saw that both MatDialogRef instances had the same id, even if set the MatDialogConfig.id. It looks like calling the MatDialogRef.close() on the first reference doesn't remove it immediately of the MatDialog and therefor calling the second MatDialog.open() returns the first instance of MatDialogRef which will be immediately closed.
I solved it by first calling the MatDialog.getDialogById() with the id of the first MatDialogRef, if it returns an instance (even if i already called the close() on it), I will call the afterClosed() and in the subscription of the Observer I call my second MatDialog.open(). This works for me.
This issue has been fixed with https://github.com/angular/material2/pull/8051
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.