stephband / jquery.event.swipe

jQuery custom events swipeleft, swiperight, swipeup and swipedown
stephband.info/jquery.event.swipe
446 stars 180 forks source link

Scroll doesn't work #26

Closed NuclleaR closed 9 years ago

NuclleaR commented 10 years ago

Hi! When i used your jquery.event.swipe scrolling doesn't work. How can I fix this issue?

kinoli commented 9 years ago

Me to.

kevnk commented 9 years ago

See #24 → http://stephband.info/jquery.event.swipe/#scroll

stephband commented 9 years ago

I would be confident say that this probably happens to every single user of this lib, hijacking default behavior doesn't seem like a great default.

The other option would be to allow scroll by default, and then people would be complaining that the swipe event doesn't work. The thing is, there's no sensible way to tell whether the current block is scrollable or not - well there is, but it's not the job of the swipe event.

This is the same default as, say, google maps, where you can't scroll from inside the map by default - instead, the map moves.

It requires a little understanding of the issue, but it is perfectly sensible.

jondavidjohn commented 9 years ago

You're absolutely correct. I leaped to respond before I understood what was going on in my individual case. It was hijacking the touch scroll for my entire page, which likely has more to do with which elements I was attaching the swipes to. Redacted my comment, perfectly sensible.

:+1: