Opened 8 years ago

Closed 8 years ago

#17931 closed defect (worksforme)

has("touch") returns false on FireFox

Reported by: ManuAir Owned by:
Priority: undecided Milestone: tbd
Component: Core Version: 1.9.3
Keywords: Cc: Sebastien Pereira
Blocked By: Blocking: #17932


Dojo's function, has("touch"), returns false on FireFox? 28.0 in a Laptop that has a touch screen.

Using IE 11 or Chrome 34.0.1847.131 m, has() returns the correct answer.

I found this while reading dojo/touch.js and using the FireFox?'s debugger, but I can reproduce the problem using the example at the end of this page:

Change History (4)

comment:1 Changed 8 years ago by bill

Blocking: 17932 added

comment:2 Changed 8 years ago by bill

Cc: Sebastien Pereira added

Duplicate/covered by #17810?

But according to, firefox still supports touchstart/touchmove/touchend, so I'm not sure why has("touch") is returning false. OTOH indicates that FF is going to support Pointer Events.

Sebastien also sent mail about this (see, repeating what he wrote in that ticket, but no one besides me answered.

comment:3 Changed 8 years ago by Sebastien Pereira

On FF desktop the touch feature is not enabled by default (this is still true on FF 29 by the way). Go to about:config and look for property dom.w3c_touch_events.enabled. There are 3 possible values: disable (0), enable (1), and auto-detect(2). When disabled, a touch on the screen will generate compatible mouse events instead of touch events, and hasTouch will indeed return false.


comment:4 Changed 8 years ago by bill

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.