vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.0.0-beta.15] v-list-item does not emit click on keyboard Enter/Space keys

Open paul-thebaud opened this issue 3 years ago • 1 comments

Environment

Vuetify Version: 3.0.0-beta.15 Last working version: 2.6.12 Vue Version: 3.2.41 Browsers: Chrome 106.0.0.0 OS: Linux x86_64

Steps to reproduce

Create any v-list-item and bind a @click listener on it. Focus the list item and try to hit Enter or Space key.

Expected Behavior

The click listener should be called.

Actual Behavior

The click listener is not called.

Reproduction Link

Relevant code:

<script setup>
const onClick = () => {
  console.log('Test clicked');
};
</script>

<template>
  <v-list-item title="Test" @click="onClick" />
</template>

Other comments

I'll try to submit a PR to fix soon.

paul-thebaud avatar Oct 28 '22 10:10 paul-thebaud

HI, I'm adding more details on this. Here is a reproduction link: https://codepen.io/paul-thebaud/pen/rNKVoxm Looks like the issue does not occurs with links list item, because anchor tag is already managing enter key.

paul-thebaud avatar Oct 28 '22 23:10 paul-thebaud

Fixed by #15998

KaelWD avatar Dec 06 '22 12:12 KaelWD