In D3, if you defined a drag function like this:
var drag = d3.behavior.drag()
.on(\"drag\", function () {alert(\"drag\")})
.on(\"dragend\",
Since 4.9.0 there is .clickDistance() with which you can control after which distance moved (from where you started dragging) you won't get a click event.
Note that you might get any click event at all if you remove the element from the DOM before release of the button (e.g. by using .raise() in the drag handler).