On the desktop version of the chrome 29, the "window.Touch" is no longer set to 'undefined' this is a problem because I used it to detect if my app is running on a touch device .
Is there an alternative solution ?
thanks
On the desktop version of the chrome 29, the "window.Touch" is no longer set to 'undefined' this is a problem because I used it to detect if my app is running on a touch device .
Is there an alternative solution ?
thanks
Yes, use 'ontouchstart' in document.documentElement
[source: How to check browser for touchstart support using JS/jQuery? ]
var isTouchDevice = 'ontouchstart' in document.documentElement;
or
if('ontouchstart' in document.documentElement) {
//do something with touch stuff
}
A lot more detailed answers and more specific solutions here: What's the best way to detect a 'touch screen' device using JavaScript?