asvd / dragscroll

micro library for drag-n-drop scrolling style
http://asvd.github.io/dragscroll/
MIT License
1.1k stars 166 forks source link

support devices : add touchstart touchend touchmove touchcancel events #7

Open Ismailmehri opened 9 years ago

asvd commented 9 years ago

thanks for your contribution!

before merging, a couple of questions/remarks:

  1. What is the need of special supporting for those events? I checked dragscroll on chrome / ipad, and there were no problem, since the touch-scrolling is performed there natively, without involving dargscroll.js.
  2. On which device / browser do you test these events?
  3. For the sake of minification, similar listener functions for all three "scroll-end" events can probably be declared once and reused:

https://github.com/Ismailmehri/dragscroll/commit/e8bcb089f298a7bda27fcf5469e1718a15c6ff86#diff-f3eeac0eb8612bcf28b6c2f0c4200bbbR75

But maybe I can do that myself after merging.

Ismailmehri commented 9 years ago

hello, 1/2 : I tested it on IOS and Android devices, but it does not work. example 1 : https://jsfiddle.net/fhx47rc2/3/ example 2 : https://jsfiddle.net/fhx47rc2/4/

asvd commented 9 years ago

Reproduced. I'll have to investigate on this, since I'm wondering why the demopage works on tablets without any special tuning:

http://asvd.github.io/dragscroll/

MartinMalinda commented 7 years ago

This should work on mobile with overflow:auto. With overflow hidden theres no scroll.