Skip to content

Commit

Permalink
fix(modal): dont swallow keyDown events
Browse files Browse the repository at this point in the history
  • Loading branch information
Chisomchima committed Jun 19, 2024
1 parent 5221e34 commit d4a0c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/modal/src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const Modal = ({
}

const handleKeyDown = (event) => {
event.preventDefault()
if (event.key === 'Escape' && onClose) {
event.preventDefault()
event.stopPropagation()
onClose()
}
Expand Down

0 comments on commit d4a0c44

Please sign in to comment.