Seemed like these were missing from touch.js so added them in. I've also updated the touch functional test page to include the new events.
I've tested on a real-life Android 2.2 device and works nicely, but I don't have access to iOS or Web OS so I was unable to verify on those.
Added "swipeUp" and "swipeDown" events and updated test page
Added longTap event and updated test page
The issue with swiping up and down on iOS is that you have to prevent the default 'touchmove' behavior or you will simply scroll the page up and down (regardless of length). I'm curious whether these will fire correctly without doing so.
I think the longtap event is useful, but i'm unsure about up/down either. The left/right swipes are here so it's easy to implement swipe-to-delete.
More complicated interactions probably require the direct use of touch events; or we could add an other plugin that provides for cross-browser handling of "manipulation" events. However, only iOS supports multi-touch in the browser right now (e.g. for pinch zooming).
Ok, appreciate the up-down scroll thing.
Seems a shame to not support up/down though - for example in Web OS as I understand that the "swipe up" gesture is the delete one, whilst on iOS the same semantics is the "swipe sideways" gesture. Simply not implementing swipe-up/down purely because you can implement a known gesture on 1 of the 3 target device platforms seems like a real shame. I guess it depends on your intended use for the library but I assumed (perhaps wrongly) that this library was general purpose, and not just for imitating existing UI patterns.
Simple option would be a way to enable these events if you want them, with a default at off. This would allow the developer to decide if up/down/left/right is applicable to their app and wont add much extra code bloat.
Let me know your thoughts - happy to implement on-off or something more detailed for manipulations if you'd like.
It definitely is genera-purpuse. That's one reason why the touch add-ons are in a separate file, so we can eventually build a build system so you can include it or not if needed. Can you make it so that you can turn on/off the up/down swipes? Maybe a flag, e.g. Zepto.enableUpDownSwipe = true; or something like that.
Zepto.enableUpDownSwipe = true;
Added flag to enable/disable swipeUp & swipeDown
Ok I've added in the flag as discussed. As before, tested on a real-life Android 2.2 device, bu not iOS or Web OS