Closed
Bug 697002
Opened 13 years ago
Closed 13 years ago
Feature detection using window.ontouchstart/.ontouchend/etc. does not work
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 659350
Firefox 9
People
(Reporter: soconnor.work, Assigned: mbrubeck)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0a2) Gecko/20111024 Firefox/9.0a2
Build ID: 20111024042025
Steps to reproduce:
Tried to use JS to test for presence of 'touchstart', 'touchmove' or 'touchend' events on window, document or any HTML element.
Actual results:
'ontouchstart' in window is false
'ontouchmove' in window is false
'ontouchstart' in window is false
'ontouchstart' in document is false
'ontouchmove' in document is false
'ontouchstart' in document is false
'ontouchstart' in document.body is false
'ontouchmove' in document.body is false
'ontouchstart' in document.body is false
Expected results:
http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
Reporter | ||
Updated•13 years ago
|
OS: Mac OS X → Android
Assignee | ||
Updated•13 years ago
|
Assignee | ||
Comment 1•13 years ago
|
||
We'll have to make sure these properties are present only when the "dom.w3c_touch_events.enabled" preferences is true. Smaug, can you point me to the right way to do this? (Or feel free to steal this bug if you have time to work on it.)
Summary: touch[start|move|end] not JS testable → Feature detection using window.ontouchstart/.ontouchend/etc. does not work
Version: Firefox 8 → Trunk
Assignee | ||
Comment 2•13 years ago
|
||
Note: For now, you can detect touch event support in Firefox and other browsers with this test: ("createTouch" in document)
Assignee | ||
Comment 3•13 years ago
|
||
It looks like this is already fixed in Firefox 9 by bug 659350, which also made the same type of feature detection work for other events, like: ("onclick" in document)
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Target Milestone: --- → Firefox 9
You need to log in
before you can comment on or make changes to this bug.
Description
•