Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

calculate trackingClick again in onTouchEnd#528

Open
larryzhuo wants to merge 1 commit intoftlabs:mainfrom
larryzhuo:master
Open

calculate trackingClick again in onTouchEnd#528
larryzhuo wants to merge 1 commit intoftlabs:mainfrom
larryzhuo:master

Conversation

@larryzhuo
Copy link
Copy Markdown

@larryzhuo larryzhuo commented Jun 13, 2017

issue

I found a bug in ios recently. when i do a fast vertically swipe. it will regard as a click event.

why

I debug the code.

FastClick.prototype.onTouchEnd = function(event) {
       
       if (!this.trackingClick) {     /*when run to there, trackingClick is still true. but  (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) is true.  trackingClick should be false.*/
 		return true;
       }

I think that onTouchMove may not change trackingClick value quickly.

solution

my solution is calculate trackingClick again in onTouchEnd.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant