Making a painting app using HTML5 and Canvas.
I think I want to have a similar system to applications like Paint and Photoshop where you can have a primary and secondary
You can use this:
$('img').bind('contextmenu', function(e){
return false;
});
See this working example!
With the lastest jQuery:
$('body').on('contextmenu', 'img', function(e){ return false; });
Note: You should use something narrower than body
if possible!
Or without jQuery, applying on canvas:
canvas.oncontextmenu = function(e) { e.preventDefault(); e.stopPropagation(); }
Updated the Fiddle Example to show the contextmenu being limited to the canvas and not the image.
JQUERY
$('body').on('contextmenu', '#myCanvas', function(e){ return false; });
HTML EXAMPLE