This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

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

  • 3 uphendule
  • 3 zinale nkinga
  • 5 views
  • Igcine ukuphendulwa ngu 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

Isisombululo esikhethiwe

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

Funda le mpendulo ngokuhambisana nalesi sihloko 👍 0

All Replies (3)

more options

Isisombululo Esikhethiwe

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