Why ('ontouchstart' in window) is false on a touch tablet with Windows 8
I use Java Script to determine if my Web-Site is running on Tablet touch device The device is Assus tablet with windows 8
Solução escolhida
Are you assuming that the return value is false because it is not true? According to this, null is sometimes returned instead of true. If false is actually returned, then I would think it is a fault with the tablet's browser. Either that or in the browser's settings there are options to pretend the device is something else (for testing purposes); there is no reason why these should be selected by default though.
If that's no help then please give us further details (such as the browser you are using).
Ler esta resposta 👍 0Todas as respostas (3)
Solução escolhida
Are you assuming that the return value is false because it is not true? According to this, null is sometimes returned instead of true. If false is actually returned, then I would think it is a fault with the tablet's browser. Either that or in the browser's settings there are options to pretend the device is something else (for testing purposes); there is no reason why these should be selected by default though.
If that's no help then please give us further details (such as the browser you are using).
I solved my problem setting dom.w3c_touch_events.enabled to 0
Sorry I mean setting dom.w3c_touch_events.enabled to 1