搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Why ('ontouchstart' in window) is false on a touch tablet with Windows 8

  • 3 个回答
  • 3 人有此问题
  • 13 次查看
  • 最后回复者为 RodiBenov

more options

I use Java Script to determine if my Web-Site is running on Tablet touch device The device is Assus 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

被采纳的解决方案

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).

定位到答案原位置 👍 0

所有回复 (3)

more options

选择的解决方案

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).

more options

I solved my problem setting dom.w3c_touch_events.enabled to 0

more options

Sorry I mean setting dom.w3c_touch_events.enabled to 1