willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.04k stars 337 forks source link

Option allowTouchMove is supported only on iOS devices. #158

Closed matej-marcisovsky closed 4 years ago

matej-marcisovsky commented 4 years ago

https://github.com/willmcpo/body-scroll-lock/blob/master/src/bodyScrollLock.js#L174

Why is listener for allowTouchMove triggered only on iOS devices? Readme file is not mentioning this.

diachedelic commented 4 years ago

This lib only blocks touch events on iOS, so allowTouchMove would not do anything on other devices. I suppose it's not mentioned because it's an implementation detail, but you are right - it is an oversight, as you would want to know that to debug your allowTouchMove function.