Ticket #13180 (closed bug: fixed)
Delegated event not firing for click within SVG use element
|Reported by:||dankellett||Owned by:||gibson042|
I have created a jsbin illustrating the potential bug. http://jsbin.com/welcome/71517/
The first js statement attaches an event using the 'live' functionality of the .on() method. This event does not fire when you click on the chart image, but will fire when you click on the SVG outside of the graph image. The event will write 'live click' to the console.
The second statement attaches an event using a regular direct event attachment to the svg container. This does work when you click on the chart and elsewhere in the SVG. The event will write 'on click' to the console.
I would expect that the two event handlers would fire no matter where you click within the SVG. The difference being that the 'live' type attachment would allow me to detach and reattach a new SVG target to the DOM without having to reattach the event handler.
- Cc gibson042, timmywil added
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to event
- Milestone changed from None to 1.9
- Owner set to dmethvin
- Status changed from open to assigned
comment:10 Changed 2 years ago by Richard Gibson
- Status changed from assigned to closed
- Resolution set to fixed