Skip to content

Type '"enter"' and '"tab"' is not assignable to type 'VOnModifiers' #13336

Open
@selicens

Description

@selicens

Vue version

3.5.14

Link to minimal reproduction

https://play.vuejs.org/#eNp9UstOAzEM/BUrl7RStT3AqSpIgDgA4iHgRjhst+5uaDaJEocWVf13nCxPCXGKPTOOZpzsxIn31WtCMRPz2ATtCSJS8sfK6t67QLCDbgIbTd21W+qVxhBhD6vgepA8J5VVtnE2EizIwhF0I7lIRM7KCeyUBXD2Ct+Sn/2+Y5QpgBGO4egYdvkGZ7Ayrh3JddHzPFZcjveTQfskqV4wKtEShlws0SBhgWKTj+jrpvTJF95tsg0ZdNtRLgyuSD7n68bK7hlojG7Wkpv5dEjPubkh7L2pCbkDmOdgUy7n0x+4mAiKbHul2+olOssLLHGVaFzvtcFw60lzLCVmwyIyVxvjNpcFo5DwIxnPdNis/8Bf4jZjStwFjBheUYkvjurQIg30+cMNbrn+Inu3TIbV/5D3yCtP2eMgO012ybZ/6Irbi/INtG0f4/mW0MbPUNloVg7vowT/hrN/on/bPagOyxw/gdi/AxNl0Dc=

Steps to reproduce

<script setup>
import { h, withModifiers } from 'vue'

const btn = h('button', {
  onKeyup: withModifiers(
    (e) => {console.log('keyup:', e.key)},
    ['tab', 'enter', 'delete', 'esc', 'space', 'up', 'down', 'right', 'left']
  )
}, 'click')
</script>

<template>
  <btn />
</template>

What is expected?

Correct prompt

What is actually happening?

  1. Type '"enter"' is not assignable to type 'VOnModifiers'
  2. Type '"tab"' is not assignable to type 'VOnModifiers'

Image

System Info

Windows 11 24H2
Microsoft Edge 136.0.3240.64

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions