jamesflorentino / nanoScrollerJS

A jQuery plugin that offers a simplistic way of implementing Lion OS scrollbars.
http://jamesflorentino.github.com/nanoScrollerJS/
MIT License
2.69k stars 502 forks source link

preventPageScrolling on touch devices #295

Open erikhagreis opened 9 years ago

erikhagreis commented 9 years ago

It seems there is no support for preventPageScrolling on touch devices. I have looked into the code, and cannot find logic in the preventScrolling function that handles events of type touchmove. There is only logic for `DOMMouseScroll' and 'wheel' events.

Am I missing anything? If not it would be feasible for me to create a pull request where also touch events are handled in this feature.

kristerkari commented 9 years ago

Yeah it is true because I guess nanoScroller was initially created with desktop browsers in mind.

If preventScrolling can be implemented so that it works consistently in mobile browsers, then there should be reason to support it as well.

erikhagreis commented 9 years ago

I'm currently working on an implementation and learning a lot about how touchdevices handle scrolling. Once I understand enough of it I'll come back to this.

kristerkari commented 9 years ago

@erikhagreis sounds good! You should share your learnings when you are done :) :+1: