score:1

Accepted answer

Add a filter for your brush:

var brush = d3.brush().filter(() => event instanceof MouseEvent).on("end", brushended)

This will only activate the brush for MouseEvent and ignore TouchEvent


Related Query

More Query from same tag