JSFiddle - React, Tailwind, and code Playground

HTML

<div>when you click this, there is a context menu</div>
<div class="nocontext">when you click this, there is no context menu</div>

JavaScript

document.querySelector(".nocontext").addEventListener("contextmenu", function(e) {
    e.preventDefault();
});