Skip to content

Commit

Permalink
fix escape not working in dialog (primefaces#6719)
Browse files Browse the repository at this point in the history
  • Loading branch information
navedqb authored Jun 3, 2024
1 parent c3bca00 commit 4706144
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/lib/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,11 @@ export const Dialog = React.forwardRef((inProps, ref) => {
className: cx('closeButton'),
'aria-label': ariaLabel,
onClick: onClose,
onKeyDown: (ev) => ev.stopPropagation()
onKeyDown: (ev) => {
if (ev.key !== 'Escape') {
ev.stopPropagation();
}
}
},
ptm('closeButton')
);
Expand Down

0 comments on commit 4706144

Please sign in to comment.