Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Jun 28, 2023
1 parent 689acc6 commit 3e2e887
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/base/components/drawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ const UnforwardedDrawer = (
) }
onKeyDown={ handleEscapeKeyDown }
onClick={ ( e ) => {
// If click was done directly in the overlay element and not one
// of its descendants, close the drawer.
if ( e.target === ref.current ) {
onRequestClose();
}
Expand Down

0 comments on commit 3e2e887

Please sign in to comment.