We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7638343 commit 2d47439Copy full SHA for 2d47439
src/lib/sidenav/sidenav.ts
@@ -135,9 +135,13 @@ export class MdSidenav implements AfterContentInit {
135
});
136
137
this.onClose.subscribe(() => {
138
- if (this._elementFocusedBeforeSidenavWasOpened) {
+ if (this._elementFocusedBeforeSidenavWasOpened instanceof HTMLElement) {
139
this._elementFocusedBeforeSidenavWasOpened.focus();
140
+ } else {
141
+ this._elementRef.nativeElement.blur();
142
}
143
+
144
+ this._elementFocusedBeforeSidenavWasOpened = null;
145
146
147
0 commit comments