Events not fired on a child component
See original GitHub issueHello,
Version: Vue 2.0.0-rc.3 Repro link: https://jsfiddle.net/p9mcn2tp/2/
When an @click
event is attached to a child component directly, the event is forgot.
But when the component is not the root, and the event is attached to the wrapper element, it works.
Uncomment the template line in the repro link, to see the workaround: the @click
is on a wrapper div.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Child component event emitter not fired in parent
I have problem with output emitter not working in parent component. It is working inside child component but not triggerred in parent. It...
Read more >LWC child can't fire event at its parent in community
When clicked, the whole flow still works but does not reach the parent method. Could it be that the parent component is missing...
Read more >Parent not catching events fired in child component-Vue.js
[Solved]-Parent not catching events fired in child component-Vue.js ... The solution I ended up finding is to fire all events in the root...
Read more >JavaScript: Preventing Parent Event When Child Event Is ...
An issue I came across while setting up my Vacation component's event handlers was that when I clicked on a child event trigger,...
Read more >Event Bubbling and Event Catching in JavaScript and React
Once an inner child element's event is called, all elements above/below it will also be called (bubbling/capturing).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
use
.native
modifier when usingv-on
on components.<foo @click.native="doSomething"></foo>
This unfortunately isn’t something the migration helper can catch, but I’ll look into adding a second reference to the guide.