Skip to content

Commit

Permalink
fix(modal): cdk re-focus open button on close (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
vt-allianz authored and GitHub Enterprise committed Mar 14, 2022
1 parent 49ef917 commit 3861518
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class NxModalContainer extends BasePortalOutlet implements AfterViewInit,
// the consumer moved it themselves before the animation was done, in which case we shouldn't
// do anything.
if (!activeElement || activeElement === this._document.body || activeElement === element || element.contains(activeElement)) {
toFocus.focus();
this._focusMonitor.focusVia(toFocus as HTMLElement, 'keyboard');
}
}

Expand Down

0 comments on commit 3861518

Please sign in to comment.