JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
862 stars 90 forks source link

a moveThreshold issue with onTap event #90

Closed lizhengqiang closed 7 years ago

lizhengqiang commented 7 years ago

when i hold touching on a tappable component and move up a very long distance and move back to the point where the move started at.

movement.x <= this.props.moveThreshold && movement.y <= this.props.moveThreshold && this.props.onTap

because of the condition can only calc the movement between endTouch and startTouch,so a very long move will be though a tap event.

so we use a Journey to calculate all the movement, let the moveThreshold real be.

dcousens commented 7 years ago

Please don't submit a build, only submit your actual changes

dcousens commented 7 years ago

+13,615 −13,648

dcousens commented 7 years ago

@lizhengqiang you still have the built files included...

mattcolman commented 7 years ago

this is kind of a duplicate of https://github.com/JedWatson/react-tappable/pull/85 right? different approach to fixing the same problem as far as I can tell.

dcousens commented 7 years ago

@mattcolman both PRs suffer the same issue. Please remove the build files.

dcousens commented 7 years ago

Closing in favour of https://github.com/JedWatson/react-tappable/pull/85#pullrequestreview-37206913