public/assets/phantom-limb.js
function phantomTouchEnd(e) {
    if (e.synthetic) return;

    mouseIsDown = false;

    e.preventDefault();
    e.stopPropagation();

    fireTouchEvents('touchend', e);

    fingers.forEach(function(finger) {
      if (!finger.target) return;

      // Mobile Safari moves all the mouse event to fire after the touchend event.
      finger.target.dispatchEvent(createMouseEvent('mouseover', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousemove', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousedown', e, finger));

      // TODO: These two only fire if content didn't change. How can we tell?
      finger.target.dispatchEvent(createMouseEvent('mouseup', e, finger));
      finger.target.dispatchEvent(createMouseEvent('click', e, finger));
    });
  }
function phantomTouchEnd(e) {
    if (e.synthetic) return;

    mouseIsDown = false;

    e.preventDefault();
    e.stopPropagation();

    fireTouchEvents('touchend', e);

    fingers.forEach(function(finger) {
      if (!finger.target) return;

      // Mobile Safari moves all the mouse event to fire after the touchend event.
      finger.target.dispatchEvent(createMouseEvent('mouseover', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousemove', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousedown', e, finger));

      // TODO: These two only fire if content didn't change. How can we tell?
      finger.target.dispatchEvent(createMouseEvent('mouseup', e, finger));
      finger.target.dispatchEvent(createMouseEvent('click', e, finger));
    });
  }
function phantomTouchEnd ( e ) { if ( e . synthetic ) return ; mouseIsDown = false ; e . preventDefault ( ) ; e . stopPropagation ( ) ; fireTouchEvents ( 'touchend' , e ) ; fingers . forEach ( function ( finger ) { if ( ! finger . target ) return ; // Mobile Safari moves all the mouse event to fire after the touchend event. finger . target . dispatchEvent ( createMouseEvent ( 'mouseover' , e , finger ) ) ; finger . target . dispatchEvent ( createMouseEvent ( 'mousemove' , e , finger ) ) ; finger . target . dispatchEvent ( createMouseEvent ( 'mousedown' , e , finger ) ) ; // TODO: These two only fire if content didn't change. How can we tell? finger . target . dispatchEvent ( createMouseEvent ( 'mouseup' , e , finger ) ) ; finger . target . dispatchEvent ( createMouseEvent ( 'click' , e , finger ) ) ; } ) ; }
Prevent all mouseup events from firing. We'll fire one manually at touchend.
Prevent all mouseup events from firing . We ll fire one manually at touchend .