andreasgal/j2me.js — pull request #549 by mcav (2014-11-07 00:41:37+00:00)
Title: Enhance tap support with mouse/pointer events and a threshold.

I believe this should fix #533 entirely. Some notes (also, see inline comments):

- Previously we didn't fire the `GESTURE_DROP` event; that seems to help.
- Using touch events where possible may increase responsiveness; calling `preventDefault()` ensures that the touch events don't need to create synthetic mouse events down the line.
- Added a threshold (currently 5px); moving less than 5px results in a tap, more than 5px results in a drag. I tested a scrollable MIDlet and it responds correctly to both taps and drags, both in Firefox (no touch events) and in the simulators (touch events).