Cari Bantuan

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.

Pelajari Lebih Lanjut

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

  • 3 balas
  • 3 memiliki masalah ini
  • 5 kunjungan
  • Balasan terakhir oleh 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

Solusi terpilih

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

Baca jawaban ini dalam konteks 👍 0

Semua Balasan (3)

more options

Solusi Terpilih

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