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

Dispatch click when touchmove was cancled #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

daniel-rabe
Copy link

When touchmove event was cancled by evt.preventDefault() clicks don't work anymore with Apple Pencil.
So I check if this happend and dispatch a new click-event on touchEnd.

@lazd
Copy link
Owner

lazd commented Aug 8, 2017

This is tough for me to test as I don't have an Apple Pencil, but I will test the standard functionality and take your word on the pencil!

@lazd
Copy link
Owner

lazd commented Aug 8, 2017

I'd like to get another set of eyes on this (or an Android tablet with a pencil) to see if this solution is cross-platform... Know anyone who can look at it @daniel-rabe ?

@daniel-rabe
Copy link
Author

no sorry i know nobody with an android pencil

i changed my local solution again, to avoid unnessaccery clicks, by keeping track of the max-y-distance of the touchmove event, and forcing the click at the end only if the distance is < 100

@spfmoby
Copy link

spfmoby commented Jul 20, 2018

I have the same problem with an ipad 2018 + pencil, I've made some tests with your code, it is now properly working (I can click on links/buttons with the pencil) but now when I click with the pencil it triggers the events twice. Probably stopPropagation() missing somewhere because a conflict with the click and the touchend... ?

@spfmoby
Copy link

spfmoby commented Jul 24, 2018

Merging daniel-rabe solution with the latest (1.0.6) version seems to do the job (no more double calls).
I still have the bad behavior (nothing happens) when clicking on a select (drop down list) with the pencil. But the regular buttons, links, ... are fine.

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.

None yet

3 participants