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

Cannot listen to kebab-case events #2480

Closed
Maronato opened this issue Oct 24, 2020 · 1 comment
Closed

Cannot listen to kebab-case events #2480

Maronato opened this issue Oct 24, 2020 · 1 comment

Comments

@Maronato
Copy link

Version

3.0.2

Reproduction link

https://codesandbox.io/s/laughing-merkle-esils?file=/src/components/HelloWorld.vue

Steps to reproduce

  • Listen to a kebab-case event (@my-event="listener")
  • Emit the event (emit("my-event"))
  • The event is not received

What is expected?

Kebab-case events should be listenable and preferred, as per the docs

What is actually happening?

My understanding is that #2278 normalizes all event listeners to pascal-casing, making it impossible to listen to kebab-case events.

In fact, binding with @myEvent="listener" works with both emit("my-event") and emit("myEvent").


I ran into this bug because of an issue posted to my library, in which my kebab-case listeners were not being triggered.

@Maronato
Copy link
Author

#2429 already reported this, my bad

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