title: Disable html5 canvas click events
body: <p>I have a canvas element, and in the canvas if you click a button it opens a <code>div</code> modal. The modal then has some buttons on it, and if you click on one of the buttons and it is also above a button in the canvas, the canvas button also gets clicked.</p>
  
  <p>I would like to disable the canvas, but I can't seem to do so. I have a tried applying css styles to the <code>canvas</code> like so:</p>
  
  <pre><code>pointer-events: none
  </code></pre>
  
  <p>But the canvas still accepts the clicks. Is there any way for me to disable the canvas so that I can click on the modal without it affecting the canvas?</p>
  
  <p>The canvas contains a game, and the game isn't always the same, so I don't have access to the canvas' code to disable the buttons in the canvas.</p>