Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Handle touch cancel event just like touch end. #9

Merged
merged 4 commits into from
Jan 23, 2017
Merged

🐛 Handle touch cancel event just like touch end. #9

merged 4 commits into from
Jan 23, 2017

Conversation

prashantpalikhe
Copy link
Contributor

In scenarios where touchend does not get fired but touchcancel does, SwiftClick leads to users having to click twice to actually click on an element. So, handling touchcancel event just like touchend event is necessary.

In scenarios where touch end does not get fired but touch cancel does, SwiftClick leads to users having to click twice to actually click on an element. So, handling touchcancel event just like touch end event is necessary.
@munkychop
Copy link
Owner

@prashantpalikhe nice, thanks. I don't have time to test right now... does this fix #8?

@prashantpalikhe
Copy link
Contributor Author

No, this does not fix #8. I'll create a PR for that one by getting rid of the ghost click related code. No worries.

@munkychop
Copy link
Owner

Looking at this, a click event will be generated within the touchEndHandler function, even though the touch was cancelled. You need to create a separate function to handle the touchcancel event.

@prashantpalikhe
Copy link
Contributor Author

Updated the PR, can you have a look?

@munkychop
Copy link
Owner

Thanks for updating it, I'll take a look this evening.

@munkychop
Copy link
Owner

@prashantpalikhe the PR looks good, but can you change the function name to touchCancelHandler (with a capital 'C') so that it is consistent with the other event handlers?

I'll merge once that's done 👍

@prashantpalikhe
Copy link
Contributor Author

Done!

@munkychop munkychop merged commit 6b3234a into munkychop:master Jan 23, 2017
@prashantpalikhe
Copy link
Contributor Author

Can you create a new tag for the repo?

@munkychop
Copy link
Owner

Tagged and published to npm 😄

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

Successfully merging this pull request may close these issues.

2 participants