Skip to content

Commit

Permalink
fix(VMenu): close when press key enter or space (#19368)
Browse files Browse the repository at this point in the history
fixes #19361

Co-authored-by: John Leider <john@vuetifyjs.com>
  • Loading branch information
rajithaeyee and johnleider authored Mar 15, 2024
1 parent 9a8dd98 commit cc266f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vuetify/src/components/VMenu/VMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export const VMenu = genericComponent<OverlaySlots>()({
isActive.value = false
overlay.value?.activatorEl?.focus()
}
} else if (['Enter', ' '].includes(e.key) && props.closeOnContentClick) {
isActive.value = false
parent?.closeParents()
}
}

Expand Down

0 comments on commit cc266f4

Please sign in to comment.