Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngTouch): don't prevent the click event after a touchmove #10985

Closed
wants to merge 1 commit into from

Conversation

mikec
Copy link
Contributor

@mikec mikec commented Feb 5, 2015

Remove the touchmove handler so that resetState is not called on touchmove. The touchend event handler already prevents the click from being triggered if the distance moved exceeds the MOVE_TOLERANCE, so detection of touchmove is not needed. Previously, because of resetState on touchmove, the click would not be triggered even if the event coordinates changed by only 1px or 2px, which seems to be very common for taps on mobile browsers.

@mikec mikec force-pushed the fix-touchmove-handler branch from 5132603 to 7c31b19 Compare February 6, 2015 16:59

Verified

This commit was signed with the committer’s verified signature. The key has expired.
12101111 韩朴宇
Remove the touchmove handler so that resetState is not called on touchmove. The touchend event handler already prevents the click from being triggered if the distance moved exceeds the MOVE_TOLERANCE, so detection of touchmove is not needed. Previously, because of resetState on touchmove, the click would not be triggered even if the event coordinates changed by only 1px or 2px, which seems to be very common for taps on mobile browsers.
@pomerantsev
Copy link
Contributor

+1

@dheidebrecht
Copy link

👍 we had to patch a local version of this to fix issues on iOS.

netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Remove the touchmove handler so that resetState is not called on touchmove.
The touchend event handler already prevents the click from being triggered
if the distance moved exceeds the MOVE_TOLERANCE, so detection of touchmove
is not needed. Previously, because of resetState on touchmove, the click would
not be triggered even if the event coordinates changed by only 1px or 2px,
which seems to be very common for taps on mobile browsers.

Closes angular#10985
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants