title: Can't get coordinates of touchevents in Javascript on Android devices
body: <p>I'm testing the HTML5 canvas and using Javascript to draw for touch enabled devices. While I have it working in iOS devices I cannot get it to work on Android. I have narrowed it down to event.pageX not returning the coordinates, but instead either returning 0, or undefined (based on the Browser).</p>
  
  <p>I've tested it on my phone running Cyanogen 7.1 in Opera Mobile and Dolphin browser, and also on a Galaxy Tab 10.1 (Android 3.1) running the standard browser.</p>
  
  <p>I've modified the code to show an alert on a touchstart event displaying the event.pageX, event.layerX and event.clientX coordinates (I'm aware that clientX should only work on iOS).</p>
  
  <pre><code>canvas.addEventListener('touchstart', function(e) {
  if (readyToDraw){
      alert("PageX: "+e.pageX+","+e.pageY+"\n LayerX: "+e.layerX+","+e.layerY+"\n + clientX: "+e.clientX+","+e.clientY);
      // prevent the browsers default action!
      e.preventDefault();
      paint = true;
      // Get coordinates
      var c = getCoords(e);
      addClick(c.x, c.y, false);
  }
  });
  </code></pre>
  
  <p>I've got the full drawing working in iOS but can't even get Android to register the coordinates, any ideas?</p>
  
  <p>FINAL EDIT: I solved the issue, see the accepted answer.</p>