Skip to content

Commit

Permalink
fix(modal): capture and return focus
Browse files Browse the repository at this point in the history
Focus is captured on a focusable element in the modal when it opened,
and focus is returned to the previously-focused element when it is
closed.

This change contributes to fixing VPAT-735.
  • Loading branch information
kevinbuhmann committed Jan 10, 2023
1 parent 6a24e3d commit 7c811ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/angular/src/modal/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
~ The full license information can be found in LICENSE in the root directory of this project.
-->

<div cdkTrapFocus class="modal" *ngIf="_open">
<div cdkTrapFocus [cdkTrapFocusAutoCapture]="true" class="modal" *ngIf="_open">
<!--fixme: revisit when ngClass works with exit animation-->
<div
[@fadeDown]="skipAnimation"
Expand Down

0 comments on commit 7c811ae

Please sign in to comment.