From 08092504ac1eaf0a3706e94b9a1015cd5f0bc638 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Tue, 4 Apr 2017 07:31:42 -0600 Subject: [PATCH] fix(dialog): fire afterClosed callback after all dialog actions are done * 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 45e7ba5925ca..8d3f4890819c 100644 --- a/src/demo-app/dialog/dialog-demo.html +++ b/src/demo-app/dialog/dialog-demo.html @@ -1,6 +1,6 @@

Dialog demo

-