Skip to content

Commit

Permalink
fix(MdMenu): preventDefault only for specific keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 authored Apr 7, 2018
1 parent 95614b6 commit 7c10a09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/MdMenu/MdMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,14 @@
window.removeEventListener('keydown', this.keyNavigation)
},
keyNavigation (event) {
event.preventDefault()
switch (event.key) {
case 'ArrowUp': this.setHighlight('up')
case 'ArrowUp':
event.preventDefault()
this.setHighlight('up')
break
case 'ArrowDown': this.setHighlight('down')
case 'ArrowDown':
event.preventDefault()
this.setHighlight('down')
break
case 'Enter': this.setSelection()
break
Expand Down

0 comments on commit 7c10a09

Please sign in to comment.