norunners / vue

The progressive framework for WebAssembly applications.
MIT License
240 stars 13 forks source link

walk parent elements to find event handlers #28

Closed 10p-freddo closed 5 years ago

10p-freddo commented 6 years ago

If you have a chunk of DOM like this:

<button v-on:click="Foobar">Click <span>here</span></button>

then clicking in the span element causes a panic in vOn, because the event target is the span but the click attribute is on the button element. The proposed change causes vOn to check for an event handler on each parent element.

norunners commented 5 years ago

Thank you for the pull request, will take a look soon. Feel free to ping me on the gopher slack if I’m not checking GitHub.

norunners commented 5 years ago

Resolving in favor of #30.