title: Removing pointer-events : none property . Not working
body: <p>I want to remove the pointer-events :none property when I right click . that's what I actually tried .</p>
  <p>HTML</p>
  <pre><code>&lt;div class=&quot;wrapper&quot;&gt;
  &lt;br /&gt;                         
    &lt;div id=&quot;viewer2&quot; class=&quot;viewer&quot; style=&quot;width:800px; height:300px; position: absolute; z-index : 0;&gt;&lt;/div&gt;
    &lt;canvas id=&quot;paper&quot; width=&quot;800&quot; height=&quot;300&quot; style=&quot;border:1px solid #ccc;position: absolute; z-index : 1;&quot;&gt;&lt;/canvas&gt;           
    &lt;br /&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Javascript</p>
  <pre><code>$('.viewer').bind('contextmenu', function(e) {
     return false;
  });
  $('#paper').bind('contextmenu', function(e) {
     return false;
  });
  document.getElementById('paper').onmousedown =FuncOnClick;
  
  function FuncOnClick(event) {
     console.log(event.which);
     switch (event.which) {
        case 1:
           document.getElementById(&quot;paper&quot;).style.pointerEvents = &quot;none&quot;;
           alert('Left');
           break;
        case 3:
           document.getElementById(&quot;paper&quot;).style.pointerEvents = &quot;&quot;;
           alert('Right ');
           break;
     }
  }
  </code></pre>
  <p>What I'm trying is to check if it's right or left click and if it's right it click on the canvas and it's left it click on the div. But when I Right click the pointer-events is staying with 'none' value .</p>
  <p>What can I do to easily remove the pointer-events attribute and do it before the click is fired (like I did in the code the click is going to click before the pointer-events is edited ?)</p>
  <blockquote>
  <p>EDIT : Added Z-index to make it a bit clearlier</p>
  <p>EDIT #2</p>
  </blockquote>
  <p>My DIV contain an image that i can move with right click and zoom with mousewheel .
  My canvas is here because i want to draw some rectangle (region of interest) . I want to draw these rectangle with right click .
  When i left click i can drag my image (div)
  When i right click i want to draw rectangle on (canvas)</p>
  <p>So what i need is to be able to pass trough the canvas when i right click .</p>