Skip to content

Not possible to open second dialog if NoopAnimationsModule is used #6719

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

Closed
Abrissirba opened this issue Aug 30, 2017 · 13 comments
Closed

Not possible to open second dialog if NoopAnimationsModule is used #6719

Abrissirba opened this issue Aug 30, 2017 · 13 comments
Assignees

Comments

@Abrissirba
Copy link

Abrissirba commented Aug 30, 2017

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?

angular@4.3.4, angular-material@beta-10

Is there anything else we should know?

This pull request looks like a suspect: #5769

devversion added a commit to devversion/material2 that referenced this issue Aug 30, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (`done` callback fires before `start`), which causes the `_isAnimating` property to be set to `true` while the animation already finished.

Fixes angular#6719
devversion added a commit to devversion/material2 that referenced this issue Aug 30, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
devversion added a commit to devversion/material2 that referenced this issue Aug 30, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
@devversion devversion self-assigned this Aug 30, 2017
@TomDemulierChevret
Copy link

TomDemulierChevret commented Sep 5, 2017

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.

@devversion devversion reopened this Sep 5, 2017
@devversion
Copy link
Member

devversion commented Sep 5, 2017

@TomDemulierChevret No ETA for this, but the PR that fixes the issue is ready for merge.

@TomDemulierChevret
Copy link

TomDemulierChevret commented Sep 6, 2017

@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.

devversion added a commit to devversion/material2 that referenced this issue Sep 15, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
devversion added a commit to devversion/material2 that referenced this issue Sep 21, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
@owen26
Copy link

owen26 commented Sep 25, 2017

I'm wondering why this issue still happens on EDGE and IE11 even if I import BrowserAnimationsModule?

devversion added a commit to devversion/material2 that referenced this issue Sep 29, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
@webUIdevelopment
Copy link

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

devversion added a commit to devversion/material2 that referenced this issue Sep 30, 2017
With SHA 36f708c, second dialogs can be only opened if the first dialog finished animating.

Due to the recent update to Angular 4.3, the animation trigger callbacks are firing in a wrong order (done callback fires before start), which causes the _isAnimating property to be set to true while the animation already finished.

@crisbeto Not too happy how the tests ended up.

Fixes angular#6719
@argoo83
Copy link

argoo83 commented Oct 6, 2017

Any workaround for this until the PR i merged and released?

@jainankit102
Copy link

This issue getting blocker for us. Any update or workaround??

@billyjacobs2014
Copy link

An update on this would be appreciated.

@billyjacobs2014
Copy link

It is pretty sad that no one will even give an update on this. Last response 22 days ago.

@dvj1988
Copy link

dvj1988 commented Nov 15, 2017

I think they are working on it. See this pull request .
#8051

@daQuark
Copy link

daQuark commented Nov 21, 2017

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.

@devversion
Copy link
Member

This issue has been fixed with #8051

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants