Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
selicens opened this issue May 16, 2025 · 0 comments · May be fixed by #13337
Open

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

selicens opened this issue May 16, 2025 · 0 comments · May be fixed by #13337

Comments

@selicens
Copy link

selicens commented May 16, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants