Mobile browsers simulate mouse events in order to support websites that only attach handlers to mouse events. However, if you want to implement two interaction models - one for mouse events, and one for touch events - then it's helpful to prevent the browser from simulating mouse events.

On iOS Safari this is fairly straightforward - simply run preventDefault on touchend:

jQuery(document).on('touchend', function(e) {
  // Do some logic      
  e.preventDefault();
});

That's pretty sane. Unfortunately, neither Android's default browser nor Dolfin cancel mouse simulation using this technique. (Dolfin will cancel mousedown when preventDefault is run on touchstart - but that's not very helpful, because you don't know what action the finger will take on touchstart.)

Is there some other way of conditionally, or even not conditionally, preventing simulated mouse events from firing?

[EDIT]

In order to begin to understand the problem(s) better, I've started a touch events compatibility table at: http://labs.cruncher.ch/touch-events-compatibility-table/

Edit
Report