Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Hi, I am working on website which works well with javascripts touch events on Default Motorola Xoom browser, when it comes to Firefox 8 or Beta version it doesn't even receives touch events

  • 1 antwoord
  • 1 heeft dit probleem
  • 4 weergaven
  • Laatste antwoord van Matt Brubeck

more options

code:

if ("touchstart" in document) {

   btn.addEventListener("touchstart", function(evt){ alert("foo");}, false);

}

it works on Motorola Xoom default browser, but not in Firefox 8 and Beta Versions.

code: if ("touchstart" in document) { btn.addEventListener("touchstart", function(evt){ alert("foo");}, false); } it works on Motorola Xoom default browser, but not in Firefox 8 and Beta Versions.

Alle antwoorden (1)

more options

Try using ("createTouch" in document) for your feature detection. That should work in all versions of Firefox, as well as other browsers.

("touchstart" in document) does not work in any version of Firefox, but ("ontouchstart" in document) will work in Firefox 9 and later: https://bugzilla.mozilla.org/show_bug.cgi?id=697002