Skip to content

Commit 5338648

Browse files
committed
Delegate the location change event to top-level dialog provider.
1 parent 8b21662 commit 5338648

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/dialog/dialog.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export class MdDialog {
3636
// Close all of the dialogs when the user goes forwards/backwards in history or when the
3737
// location hash changes. Note that this usually doesn't include clicking on links (unless
3838
// the user is using the `HashLocationStrategy`).
39-
_location.subscribe(() => this.closeAll());
39+
if (!_parentDialog) {
40+
_location.subscribe(() => this.closeAll());
41+
}
4042
}
4143

4244
/**

0 commit comments

Comments
 (0)