title: Right mouse click detection on SVG shape in JavaScript not working
body: <p><br>
  I need some help with my script in which I would like to detect RMB click.<br>
  INFO: finally I want to display my own right-click menu on a dedicated SVG shape, which is displayed with a use of Raphael js lib, I found out that there are many different examples on web, even very simple ones to implement, like with jQuery - but I have to be able to detect wether RMB was clicked or any other.<br>
  I have tried (without success on RMB) a following peace of code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="raphael.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          window.onload = function() {
              var paper = new Raphael(document.getElementById('canvas_container'), 300, 300);
              var shape = paper.path('m150,150l40,0l0,20l-40,0l0,-20z');
              var fill=shape.attr({fill:'#FFFFFF'});
              fill.click(function (evt){
                  if(evt.button == 2) {
                      // right mouse button pressed
                      evt.preventDefault();
                  }
                  alert("Pressed mouse = " + evt.button.toString());
              });
          }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;!--    &lt;BODY oncontextmenu="return false"&gt; --&gt;
  &lt;body&gt;
      &lt;div id="canvas_container"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><br>in IE only LMB(0) is detected, in Chrome left(0) and middle(1) and default context menu is displayed, when I disable it inside body tag (as commented-out) context menu is not displayed at all, but I still cannot get the alert with RMB(2),</p>
  
  <p>thank you for all the hints/support,
  Borys</p>