material icon indicating copy to clipboard operation
material copied to clipboard

A child dialog opened from a parent dialog won't close.

Open du6 opened this issue 11 years ago • 4 comments

I tried to open a child md-dialog from a parent md-dialog by event broadcasting. But the mddialog.cancel() function does not close the child dialog.

Codepen demo:

http://codepen.io/anon/pen/VvpWXe

du6 avatar Oct 05 '15 23:10 du6

Stacked Dialogs are not supported.

ThomasBurleson avatar Oct 06 '15 00:10 ThomasBurleson

It is not stacked dialogs. The parent dialog called mddialog.cancel() to close itself before rootScope broadcasting the event to open the child dialog. But somehow the child dialog no longer responses to mddialog service.

du6 avatar Oct 06 '15 01:10 du6

Hi,

I had the same issue. And 2 solutions for this:

  • Don't close the first dialog manually, mddialog.show will close it for you (but then you can't return a value which is an issue)
  • or use $timeout before opening the second dialog. I had to set 1000ms for this to work all the time (seems to depends on performance) - This is not great for customers as the apps seems slow.

I think there's some kind on conflict in the chain process.

no-more avatar Oct 06 '15 06:10 no-more

Not reproducible with v1.0.1

du6 avatar Jan 11 '16 19:01 du6