vuetify
vuetify copied to clipboard
[Bug Report][3.0.0-beta.15] v-list-item does not emit click on keyboard Enter/Space keys
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.
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.
Fixed by #15998