Skip to content

Commit f54ca9a

Browse files
authored
fix(VList): ignore input element interactions (#20881)
fixes #20523
1 parent 9e5a3c8 commit f54ca9a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/vuetify/src/components/VList/VListGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const VListGroup = genericComponent<VListGroupSlots>()({
6767

6868
function onClick (e: Event) {
6969
e.stopPropagation()
70+
if (['INPUT', 'TEXTAREA'].includes((e.target as Element)?.tagName)) return
7071
open(!isOpen.value, e)
7172
}
7273

packages/vuetify/src/components/VList/VListItem.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export const VListItem = genericComponent<VListItemSlots>()({
184184

185185
function onClick (e: MouseEvent) {
186186
emit('click', e)
187+
if (['INPUT', 'TEXTAREA'].includes((e.target as Element)?.tagName)) return
187188

188189
if (!isClickable.value) return
189190

@@ -201,6 +202,7 @@ export const VListItem = genericComponent<VListItemSlots>()({
201202
}
202203

203204
function onKeyDown (e: KeyboardEvent) {
205+
if (['INPUT', 'TEXTAREA'].includes((e.target as Element)?.tagName)) return
204206
if (e.key === 'Enter' || e.key === ' ') {
205207
e.preventDefault()
206208
e.target!.dispatchEvent(new MouseEvent('click', e))

0 commit comments

Comments
 (0)