Skip to content

Commit

Permalink
Do not prevent all keys!!
Browse files Browse the repository at this point in the history
  • Loading branch information
runely committed May 25, 2022
1 parent 62e7ca4 commit 02876ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/ConfirmationDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default function ConfirmationDialog ({ open, title, children, okBtnText,
}, [onClickOk])

const listenForEnter = useCallback((e) => {
try {
e.preventDefault()
e.stopPropagation()
} catch {}

if (e.key === 'Enter') {
try {
e.preventDefault()
e.stopPropagation()
} catch {}

handleOkClick()
}
}, [handleOkClick])
Expand Down

0 comments on commit 02876ee

Please sign in to comment.