Skip to content

Commit

Permalink
fix(menu-option): prevent keyboard event default
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Jan 1, 2025
1 parent 02fa144 commit dd6d5ba
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/varlet-ui/src/menu-option/MenuOption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,8 @@ export default defineComponent({
return
}
if (event.key === 'ArrowRight') {
call(props.onKeyArrowX, event.key)
}
if (event.key === 'ArrowLeft') {
if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
preventDefault(event)
call(props.onKeyArrowX, event.key)
}
Expand Down

0 comments on commit dd6d5ba

Please sign in to comment.