Skip to content

Commit

Permalink
Fix focus return when dismissed
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Feb 19, 2025
1 parent 821be7a commit 7601474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function UnforwardedModal(
}, [ contentRef ] );

// Accessibly isolates/unisolates the modal.
useEffect( () => {
useLayoutEffect( () => {
ariaHelper.modalize( ref.current );
return () => ariaHelper.unmodalize();
}, [] );
Expand Down

0 comments on commit 7601474

Please sign in to comment.