d3 disable context menu

JavaScript
.on("contextmenu", function (d, i) {
    d3.event.preventDefault();
    // react on right-clicking
})
Source

Also in JavaScript: