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

False touchscreen detection #5

Open
GerrGIT opened this issue Sep 6, 2016 · 1 comment
Open

False touchscreen detection #5

GerrGIT opened this issue Sep 6, 2016 · 1 comment

Comments

@GerrGIT
Copy link
Contributor

GerrGIT commented Sep 6, 2016

Touchscreen detection won't work properly on all devices.
For example in Windows 7 using Google Chrome 53. On a laptop with no touchscreen, it detects touch support.

In src/calenstyle.js row 469 there is a detection that returns true while it should return false:
469 : sClickHandlerButtons: ("ontouchstart" in document.documentElement ? "touchstart" : "click"),

The result is that the buttons won't work. A quick fix could be to always use "click". It looks like this was understood before if I look at line 468 that always returns "click":
468: sClickHandler: ("ontouchstart" in document.documentElement ? "click" : "click"),

The only question I have is what to do with line 467, since there is not a reliable way to detect a touch device, but this variable (bTouchDevice) is in use in a lot of code lines in this script.
467: bTouchDevice: ("ontouchstart" in document.documentElement ? true : false),

Any suggestions?

@nehakadam
Copy link
Owner

Thank you for reporting issue!
The condition on line 469 is added for mobile devices, as click was causing delay in performing action, so it should not be changed before performing cross-browser testing.
I will find an alternative and get back to you.

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

No branches or pull requests

2 participants