I have some d3.js element, for example:
// draw rectangle svg.selectAll(".rect").append("rect") .attr("y", 10) .attr("x", 10) .attr("height", 5) .attr("width", 5) .on("contextmenu", function (d, i) { // react on right-clicking });
and it works great, but also opens the browser context menu. How can I prevent this?
Askar ibragimov
source share