From ee1a5a7aa3c31c00c4d5bcd3285a1302e7bd5a43 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 18 Apr 2017 00:16:02 +0200 Subject: [PATCH] fix(dialog): fire afterClosed callback after all dialog actions are done (#3892) * Fires the afterClosed callback once the dialog is removed and the previously-focused element has been refocused. Until now the order was reversed, which prevents people from being able to refocus a different element. * Cleaned up the `MdDialogContainer` logic to simplify it and to remove the need to subscribe to zone events. --- src/demo-app/dialog/dialog-demo.html | 2 +- src/lib/dialog/dialog-container.ts | 58 +++++++++------------------- src/lib/dialog/dialog-ref.ts | 24 ++++++------ src/lib/dialog/dialog.spec.ts | 51 +++++++++++++----------- 4 files changed, 61 insertions(+), 74 deletions(-) diff --git a/src/demo-app/dialog/dialog-demo.html b/src/demo-app/dialog/dialog-demo.html index 45e7ba5925c..8d3f4890819 100644 --- a/src/demo-app/dialog/dialog-demo.html +++ b/src/demo-app/dialog/dialog-demo.html @@ -1,6 +1,6 @@

Dialog demo

-