Skip to content

Commit 2dd6747

Browse files
babu-chjohnleider
andauthored
fix(VListItem): allow space key in input tag (#21032)
fixes #21030 Co-authored-by: John Leider <[email protected]>
1 parent 41dad8c commit 2dd6747

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ export const VListItem = genericComponent<VListItemSlots>()({
201201
}
202202

203203
function onKeyDown (e: KeyboardEvent) {
204+
const target = e.target as HTMLElement
205+
206+
if (['INPUT', 'TEXTAREA'].includes(target.tagName)) return
207+
204208
if (e.key === 'Enter' || e.key === ' ') {
205209
e.preventDefault()
206210
e.target!.dispatchEvent(new MouseEvent('click', e))

0 commit comments

Comments
 (0)