d3 / d3-drag

Drag and drop SVG, HTML or Canvas using mouse or touch input.

Home Page:https://d3js.org/d3-drag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

d3.event.sourceEvent.target in safari mobile

gshrman opened this issue · comments

There seems to be a discrepancy between desktop browsers and safari mobile browser when calculating d3.event.sourceEvent.target during a drag event. See example below:

https://jsfiddle.net/5ngf178o/10/

Per https://www.w3.org/TR/touch-events/#touchevent-interface:

target of type EventTarget, readonly
The EventTarget on which the touch point started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element.