Skip to content

Commit

Permalink
fix(VListItem): dont trigger kb events for disabled item
Browse files Browse the repository at this point in the history
  • Loading branch information
lampdev committed Jun 24, 2022
1 parent ff519c6 commit 21f736e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vuetify/src/components/VList/VListItem.ts
Expand Up @@ -168,10 +168,12 @@ export default baseMixins.extend<options>().extend({
data[this.to ? 'nativeOn' : 'on'] = {
...data[this.to ? 'nativeOn' : 'on'],
keydown: (e: KeyboardEvent) => {
/* istanbul ignore else */
if (e.keyCode === keyCodes.enter) this.click(e)
if (!this.disabled) {
/* istanbul ignore else */
if (e.keyCode === keyCodes.enter) this.click(e)

this.$emit('keydown', e)
this.$emit('keydown', e)
}
},
}

Expand Down

0 comments on commit 21f736e

Please sign in to comment.