I want to display a custom conext menu when user right-clicks on certain elements on the page i.e. table. As of now, I have both custom and default context menu display.
function element_right_clicked(sender,e){
if(e.which == 3){
// code here that displays custom menu
sender.addEventListener("contextmenu", e => {
e.preventDefault();
});
}
}
I am looking for a way, not to display default menu when custom is shown.