Skip to content
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

Native event attribute does not work #927

Closed
faisalhakim47 opened this issue Apr 6, 2020 · 0 comments
Closed

Native event attribute does not work #927

faisalhakim47 opened this issue Apr 6, 2020 · 0 comments

Comments

@faisalhakim47
Copy link

faisalhakim47 commented Apr 6, 2020

Version

3.0.0-alpha.11

Reproduction link

https://codepen.io/faisalhakim47/pen/bGdPmaQ

Steps to reproduce

  1. Create event handler with onclick attribute.
  2. See the error console (in devtools).
vue.global.js:9997 Uncaught TypeError: Cannot use 'in' operator to search for 'options' in alert('from native')

What is expected?

Work

What is actually happening?

Error


Fix suggestion, in this file,

https://github.com/vuejs/vue-next/blob/899287ad35d8b74e76a71f39772a92f261dfa4f8/packages/shared/src/index.ts#L27

change the isOn conditions to something like:

export const isOn = (key: string) => key[0] === 'o' && key[1] === 'n' && key[2] === key[2].toUpperCase()
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant