Skip to content

Commit 669c89e

Browse files
committed
fix: prevent keydown bubbling from child buttons in NotificationItemCard
1 parent 0c0bf61 commit 669c89e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/src/components/notifications/NotificationItemCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export function NotificationItemCard({
7474
)}
7575
onClick={handleClick}
7676
onKeyDown={(e) => {
77-
if (e.key === 'Enter' || e.key === ' ') {
77+
if ((e.key === 'Enter' || e.key === ' ') && !(e.target as HTMLElement).closest('button')) {
7878
e.preventDefault()
7979
handleClick()
8080
}

0 commit comments

Comments
 (0)