d3 / d3-selection

Transform the DOM by selecting elements and joining to data.

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot create svgpoint from a keyboard event in Firefox

dplassgit opened this issue · comments

In point.js it assumes that the event has defined clientX and clientY fields. But, if the event is a keyboard event it will not have those fields. Chrome is OK with assigning undefined to the field, but Firefox throws an exception:

TypeError: Value being assigned to SVGPoint.x is not a finite floating-point value.

d3.clientPoint isn’t supposed to be passed a KeyboardEvent. It expects a MouseEvent or a Touch.