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

fix(ngTouch): prevent touchmove from canceling a click #11359

Closed
wants to merge 1 commit into from

Conversation

pomerantsev
Copy link
Contributor

Usually browsers fire touchstart and touchend, and ng-click works.
But some browsers (I only experienced it on iOS) fire touchmove
between touchstart and touchend, and so before this fix ng-click
would not work in this case.
Also, the test for touchmove was incorrect: it did not test
the touchmove event itself, but rather the coordinates change,
which is handled elsewhere. If the coordinates are the same and
the interval is not too long, ng-click should fire, no matter if
there was a touchmove or not.

Usually browsers fire touchstart and touchend, and ng-click works.
But some browsers (I only experienced it on iOS) fire touchmove
between touchstart and touchend, and so before this fix ng-click
would not work in this case.
Also, the test for touchmove was incorrect: it did not test
the touchmove event itself, but rather the coordinates change,
which is handled elsewhere. If the coordinates are the same and
the interval is not too long, ng-click should fire, no matter if
there was a touchmove or not.
@petebacondarwin
Copy link
Contributor

Hi @pomerantsev - this is a duplicate of #10985

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

Successfully merging this pull request may close these issues.

3 participants