We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following code it does not bind to "click" if "ontouchstart" exists.
On a Windows 8 laptop with both touch-screen and mouse, mouse clicks on sidr are ignored.
if('ontouchstart' in document.documentElement) { $this.bind('touchstart', function(e) { var theEvent = e.originalEvent.touches[0]; this.touched = e.timeStamp; }); $this.bind('touchend', function(e) { var delta = Math.abs(e.timeStamp - this.touched); if(delta < 200) { e.preventDefault(); methods.toggle(name); } }); } else { $this.click(function(e) { e.preventDefault(); methods.toggle(name); }); }
The text was updated successfully, but these errors were encountered:
This is also true of FireFox on OSX which returns true for the condition. Looked around and found this: http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
IMO, The best solution is to bind to both.
Sorry, something went wrong.
Implementing fastclick and fixing laptop touchscreen problems. This f…
dfa93b6
…ixes #179 and fixes #266 and fixes #246 and fixes #245 and fixes #211 and fixes #178 and fixes #118 and fixes #98 and fixes #214 and fixes #117 and fixes #130 and fixes #144 and fixes #146 and fixes #165 and fixes #189 and fixes #193 and fixes #203 and fixes #213 and fixes #218 and fixes #240 and fixes #249
Preparing a new version with a fix for this https://github.com/artberri/sidr/tree/reborn
No branches or pull requests
In the following code it does not bind to "click" if "ontouchstart" exists.
On a Windows 8 laptop with both touch-screen and mouse, mouse clicks on sidr are ignored.
The text was updated successfully, but these errors were encountered: