title: Canvas pixel coordinate offset after scroll bar is used
body: <p>I'm using a canvas at the top of a page. Im writing out the pixel coordinates from the canvas at a mousemove event. Normally, the most bottom Y-value is equal to the canvas height, i e. 700px. But after scrollbar is used to scroll down a bit on the page, the bottom y-coordinate in the canvas will change accordingly to say 400px instead.</p>
  
  <pre><code>            document.getElementById("mapcanvas").addEventListener("mousemove", getPosition, false);
  
              function getPosition(event)
              {
                var x = event.x;
                var y = event.y;
  
                var canvas = document.getElementById("mapcanvas");
  
                x -= canvas.offsetLeft;
                y -= canvas.offsetTop;
  
  
  
               document.getElementById("canvascoords").innerHTML = "Canvascoords: "+ "x=" + x + ", y=" + y;
  
  
  
  
  
              }
  </code></pre>
  
  <p>... Where "mapcanvas" is my div holding the canvas. </p>
  
  <p>Any ideas of making the y-coordinate independent from usage of scroll bar so that the lower y-coordinate always i 700px?</p>