d3-brush icon indicating copy to clipboard operation
d3-brush copied to clipboard

Errors when using `filter` on mobile

Open sheldonbaker opened this issue 2 years ago • 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).

sheldonbaker avatar Oct 06 '22 17:10 sheldonbaker

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

muellnerlisa avatar Nov 22 '23 10:11 muellnerlisa

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.

sheldonbaker avatar Nov 22 '23 15:11 sheldonbaker