I am working on a web application in which I want some action to happen on an element, whether I left it or right-click on it.
So, I first added a function to handle the click event using jQuery, and then added a second function to handle the oncontextmenu attribute of my element.
This works well in Chrome and IE, but causes a problem in Firefox. When I right-click on an element, my function that processes the left click invokes an unexpected name, and then my function that processes the right click is called.
How can I make Firefox not invoke the left-click function when right-clicking?
Julien Boyreau
source share