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: $mdDialog.hide( dialogref, "closed" ) closes the last opened dialog instead of the specified dialog #10562

@simonemazzoni

Description

@simonemazzoni

Actual Behavior:

  • What is the issue? * $mdDialog.hide( dialogref, "closed" ) should close the specified dialog passed as first argument, but actually closes the last opened dialog.
  • What is the expected behavior? Close the specified dialog!

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: http://codepen.io/simomazzoni/pen/YZgdoZ
  • Details: Click on LAUNCH DIALOGS ONE AND TWO button, and then clink on 'ONE' ONLY button to see that dialog 'TWO' is closed instead. Same behavior if you open dialog 'ONE' and press 'TWO' ONLY button.

These behaviors lead me to think that $mdDialog.hide() arguments are ignored.

AngularJS Versions: *

  • AngularJS Version: 1.6.3 (Same happens also in previous versions)
  • AngularJS Material Version: 1.1.3 (Same happens also in previous versions)

Additional Information:

  • Browser Type: * Google Chrome
  • Browser Version: *57.0.2987.133 (Official Build) (64-bit)
  • OS: * macOSsierra
  • Stack Traces:

Why it happens? Am I doing something wrong?

Notice that these lines of code, seem to confirm my suspects.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions