-
Notifications
You must be signed in to change notification settings - Fork 223
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
Can't trigger long taps on Surface Pro #166
Comments
Can you please send me the user agent that you're using? I suspect it could be an issue with the touch detection. Do the other events function as expected? In particular, I'd be interested if |
The user agent for Firefox: Chrome: Yes, the tapstart/tapend work when I click or click and hold, also when I tap with finger. |
I just checked, jQuery Mobile has the same exact issue. |
Interesting, I can't seem to replicate it by changing the UA alone, so I think it must be something in the Surface Pro sandbox. Can you do me a favour and try using the unminified code in this commit: It basically reduces the threshold for |
I tried that code and no difference. The same behavior. |
Correction to my previous comment: I got it working with jquery mobile (v. 1.4.5) and jquery v.1.11.3 (lower version due to compatibility with jquery mobile). It doesn't have |
It appears that holding a touch on the Surface Pro actually selects the element. As such, I don't think it's actually a fault with the library, you just need to prevent the default action. Can you see if the following works: $(element).on('touchstart', (e => { e.preventDefault(); }));
$(element).on('taphold', function(e) { }); |
Unfortunately, that didn't work. It seems though the I did some testing with Touch Events in JS and interestingly, they all work perfectly. Even without the I also tried to combine the two with something like this: (though not sure it is even permissible)
but this also doesn't work. Only "touchStart" is shown in console. |
Firstly, thanks for the plugins!
But I encountered this issue of tapend or taphold not getting called when touching on my Surface Pro, on neither Chrome nor Firefox.
When I click with mouse or hold the click, the events are called with no problem. but when touching, only quick tapping fires tapstart/tapend/taphold and holding the touch triggers none of them.
What do you think is causing this?
The text was updated successfully, but these errors were encountered: