I am porting the application in JavaScript / CSS and it uses a right click. For some reason, Firefox 3.6 for Windows does not issue a right-click event, but Chrome and IE do. Here are some test codes. If you right-click #test , you will not get anything in Firefox, but you will get a warning in Chrome and IE.
<html> <head> <title>Hi</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $("#test").get(0).oncontextmenu = function() { return false; }; $("#test").mousedown(function() { alert("hi"); }); }); </script> </head> <body> <div id="test" style="background: red;">Hi</div> </body> </html>
Why isn't a right-click event fired in Firefox?
source share