Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

dialog: "Ghost Dialogs" created when $mdDialog resolver fails #11460

@codymikol

Description

@codymikol

Bug, enhancement request, or proposal:

Bug

CodePen and steps to reproduce the issue:

Ghost Bug Demo which demonstrates the issue:

Detailed Reproduction Steps:

  1. In my CodePen open the first Dialog via the "Open This Button"
  2. Notice If you press close in the upper right hand corner it will close as expected.
  3. Open it again and click on the "BREAKS" button one or more times.
  4. Now notice you will have to press the same close button as many times as you pressed BREAKS + 1 in order to close the current dialog.

What is the expected behavior?

When attempting to open a dialog whose resolver object fails to complete, a dialog should either never be created, or treated as cancelled.

What is the current behavior?

A "Ghost Dialog" is created that cannot be seen, butt calling $mdDialog seems to close them. That is why you can press the "BREAKS" button twice and then press close three times before the dialog actually closes. Two "Ghost Dialogs" are created and then cancelled before you can cancel the visible dialog.

What is the use-case or motivation for changing an existing behavior?

In our case we utilize large md-dialogs that have a lot of sub-screens in combination with md-tabs. Some of these screens have smaller modals that require network requests that are processed via the resolver. In most cases these are successful and we would not experience this problem, but if a service goes down, the interface would appear to be broken to a user.

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: Latest
  • AngularJS Material: Latest
  • OS: OSX / Linux / Windows
  • Browsers: Chrome / Safari / Firefox / IE11

Is there anything else we should know? Stack Traces, Screenshots, etc.

It doesn't seem like there are any DOM nodes that get created for these "Ghost Dialogs". Other than that I haven't had much of a chance to look into this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions