Skip to content

Commit

Permalink
fix(FocusTrap): preventDefault on Escape (#6681)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud authored and actions-user committed Mar 13, 2024
1 parent 491d6d8 commit cc11ede
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vkui/src/components/FocusTrap/FocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const FocusTrap = <T extends HTMLElement = HTMLElement>({
}
case Keys.ESCAPE: {
if (onClose) {
event.preventDefault();
onClose();
}
}
Expand Down

0 comments on commit cc11ede

Please sign in to comment.