File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export class MdDialogContainer extends BasePortalHost implements OnDestroy {
59
59
@ViewChild ( FocusTrap ) _focusTrap : FocusTrap ;
60
60
61
61
/** Element that was focused before the dialog was opened. Save this to restore upon close. */
62
- private _elementFocusedBeforeDialogWasOpened : Element = null ;
62
+ private _elementFocusedBeforeDialogWasOpened : HTMLElement = null ;
63
63
64
64
/** The dialog configuration. */
65
65
dialogConfig : MdDialogConfig ;
@@ -89,7 +89,7 @@ export class MdDialogContainer extends BasePortalHost implements OnDestroy {
89
89
// ready in instances where change detection has to run first. To deal with this, we simply
90
90
// wait for the microtask queue to be empty.
91
91
this . _ngZone . onMicrotaskEmpty . first ( ) . subscribe ( ( ) => {
92
- this . _elementFocusedBeforeDialogWasOpened = document . activeElement ;
92
+ this . _elementFocusedBeforeDialogWasOpened = document . activeElement as HTMLElement ;
93
93
this . _focusTrap . focusFirstTabbableElement ( ) ;
94
94
} ) ;
95
95
@@ -113,6 +113,7 @@ export class MdDialogContainer extends BasePortalHost implements OnDestroy {
113
113
if ( toFocus && 'focus' in toFocus ) {
114
114
toFocus . focus ( ) ;
115
115
}
116
+
116
117
this . _onAnimationStateChange . complete ( ) ;
117
118
} ) ;
118
119
}
You can’t perform that action at this time.
0 commit comments