Hi! I use latest emscripten (incoming) and i have a trouble. My app works 
fine in FF, but on Chrome, Android, and WP10 my app doesn`t handle any 
mouse/touch events.
Code of library_glut.js:
    var isTouchDevice = 'ontouchstart' in document.documentElement;

    window.addEventListener("keydown", GLUT.onKeydown, true);
    window.addEventListener("keyup", GLUT.onKeyup, true);
    if (isTouchDevice) {
      window.addEventListener("touchmove", GLUT.onMousemove, true);
      window.addEventListener("touchstart", GLUT.onMouseButtonDown, true);
      window.addEventListener("touchend", GLUT.onMouseButtonUp, true);
    } else {
      window.addEventListener("mousemove", GLUT.onMousemove, true);
      window.addEventListener("mousedown", GLUT.onMouseButtonDown, true);
      window.addEventListener("mouseup", GLUT.onMouseButtonUp, true);
      // IE9, Chrome, Safari, Opera
      window.addEventListener("mousewheel", GLUT.onMouseWheel, true);
      // Firefox
      window.addEventListener("DOMMouseScroll", GLUT.onMouseWheel, true);
   }

Why we do not add event listeners for mouse (mouseup,...) if browser is 
support ontouchstart? For exmaple my pc is dell laptop with touchscreen. So 
in Chrome isTouchDevice is true, and no one mouse clicks work, only 
touching the screen is interpreted as click. BTW i don`t understand why 
touch events doesn`t works on Android and WP10 devices, i see that app is 
fine working but i can`t do any interaction. Any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to