Skip to content

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

Closed

Description

@Abrissirba

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

Activity

  1. added 3 commits that reference this issue on Aug 30, 2017
    34f2b7a
    c09683f
    9744725
  2. self-assigned this
    on Aug 30, 2017
  3. TomDemulierChevret commented on Sep 5, 2017

    @TomDemulierChevret

    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.

  4. devversion commented on Sep 5, 2017

    @devversion
    Member

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

  5. TomDemulierChevret commented on Sep 6, 2017

    @TomDemulierChevret

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

  6. added 2 commits that reference this issue on Sep 15, 2017
    01fae7a
    1a49212
  7. owen26 commented on Sep 25, 2017

    @owen26

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

  8. added a commit that references this issue on Sep 29, 2017
    d542bb4
  9. webUIdevelopment commented on Sep 29, 2017

    @webUIdevelopment

    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

  10. added a commit that references this issue on Sep 30, 2017
    b13ceca
  11. argoo83 commented on Oct 6, 2017

    @argoo83

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

  12. jainankit102 commented on Oct 25, 2017

    @jainankit102

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

  13. billyjacobs2014 commented on Oct 26, 2017

    @billyjacobs2014

    An update on this would be appreciated.

  14. billyjacobs2014 commented on Oct 28, 2017

    @billyjacobs2014

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

  15. dvj1988 commented on Nov 15, 2017

    @dvj1988

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

  16. daQuark commented on Nov 21, 2017

    @daQuark

    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.

  17. devversion commented on Nov 28, 2017

    @devversion
    Member

    This issue has been fixed with #8051

  18. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  19. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions