jquery/jquery-mobile — comment on commit 7b1966c8506b10ab357f446f18637e11bdced6ea
File:  line 0
By jblas:

@jbergantine

Basically what the code is trying to say is that if the following constraints were satisfied:

- Touch event ended before the durationThreshod expired.
- The x-direction (horizontal) exceeded the horizontalDistanceThreshold
- The y-direction did *NOT* stray more than verticalDistanceThreshold from the original y value saved during the touchstartt event

then a left/right swipe event is triggered.

In my opinion the scrollSupressionThreshold is un-necessary, and should be removed such that we always prevent the scroll. The reason I say this is because the threshold is 10px which is the same magic number that iOS and Android use to trigger/initiate scrolling. If we don't want scrolling, then we should just preventDefault on every touchmove event.