Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Jul 25, 2023
1 parent 8951676 commit 2750830
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/components/src/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ function UnforwardedModal(
overlayClassName
) }
onKeyDown={ handleEscapeKeyDown }
// Avoids loss of focus from clicking the overlay and also obviates
// `useFocusOutside` aside from cases of focus programmatically
// moving outside. TODO ideally both the hook and this handler
// won't be needed and one can be removed.
onPointerDown={
shouldCloseOnClickOutside ? onOverlayPress : undefined
}
Expand Down

0 comments on commit 2750830

Please sign in to comment.