Quantcast
Viewing all articles
Browse latest Browse all 4829

Handling Events in SVG elements in Ember

@ondrejsevcik wrote:

Hi, I’m building some SVG graphs and I need to bind action on mouseEnter.

I’ve tried to attach action on <rect> element but it is not working.

<rect onMouseEnter={{action "log"}}></rect>

I’ve tried the same on <div> element and it to my surprise works.

I’ve also tried to handle it with native javascript and that to also works.

<rect onmouseenter="javascript:alert('native works')"></rect>

Am I doing something wrong or is SVG treated somehow special in Ember?

Thank you Image may be NSFW.
Clik here to view.
:pray:

Here’s the twiddle

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles