I am trying to prevent the standard right click menu from popping up on some information so i can display my own custom right click menu.
Right now I am getting both with the standard one appearing over the custom.
Here's my html:
<span onmouseup=\"OnRowMouseUp('Filename');\">Filename</span>
Here's my JavaScript:
var OnRowMouseUp = function (selectedField) {
e = window.event;
e.preventDefault();
console.log(e);
//this.ShowContextMenu(selectedField, e.clientX, e.clientY);
}
e is definitely a mouse event as I can view it in console. A lot of the other SO answers say that I should be using preventDefault()
but it dosen't seem to be working in this circumstance. Any ideas?