d3/d3-brush

Errors when using `filter` on mobile

sheldonbaker opened this issue · 2 comments

On a mobile device, when using brush.filter, any events that are removed by the filter will end up causing an error of emitter(...).moved is not a function or emitter(...).touchended is not a function.

function touchmoved(event) {
  emitter(this, arguments).moved(event);
}

function touchended(event) {
  emitter(this, arguments).ended(event);
}

https://codepen.io/sheldoncodes/pen/jOxvmdq (simulate a mobile device in your devtools).

I am experiencing the exact same issue, did anyone find a solution for this error?

I am experiencing the exact same issue, did anyone find a solution for this error?

No, I just had to filter the specific error message so it stays out of my logs.