vistaprint/PointyJS — pull request #4 by benhutchins (2014-08-20 18:58:19+00:00)
Title: iOS bug fix, fix edge case for gesture events.

iOS fix: on touch devices (TouchEvents), a slow tap would result in the emulated `mousedown`, `mouseup` and `click` event still. To prevent this, *we have to* call `event.preventDefault()` on `touchstart`. We used to do this to fix this problem, however we removed that because it resulted in the native `click` event from always being prevented. We are able to do this now however because we now always ensure a `click` event is triggered from the `pointerup` event. We also ensure that whenever you listen only to a `pointerdown` event we also bind a noop `pointerup` event to simply ensure that we keep proper track of active buttons.

Additional fix to resolve edge case. If you call `event.stopPropagation()` on a `pointerup` event it would result in the following `press` event from not firing. Other similar edge cases exist, and we must clone the original event before triggering `press`, `presshold` or `sweep` events. I've created an outline for this but the complete issue is not resolved, however the propagation issue is. Additionally I've done the same thing to the `event.preventDefault()` method by resetting it as well before triggering the pointy.gesture event.