Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 360ae32f51
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (61 sloc) 3.208 kB


Project owner:Evan Huang

dojo/touch is a module that provides a set of events designed to work similarly on a desktop browser (e.g. with mouse) and touch devices, so that the developer only needs to handle code for one set of events and abstract themselves from the specifics of mouse and touch events.


Requiring in the module makes the events available for handling:

There are two main ways of using dojo/touch. The first is using it coupled with :ref:`dojo/on <dojo/on>`. For example:

Also, the touch event listeners can be registered directly with the module:


The following table provides information on the events supported by the module:

dojo/touch Event Browser Touch Device Notes
press mousedown touchstart  
release mouseup touchend  
over mouseover synthetic  
out mouseout synthetic  
enter :ref:`dojo/mouse::enter <dojo/mouse#enter>` synthetic  
leave :ref:`dojo/mouse::leave <dojo/mouse#leave>` synthetic  
move mousemove synthetic This synthetic events fires on the node that the finger is currently over, rather than the node where the drag started.
cancel mouseleave touchcancel  


:ref:`dojox/gesture <dojox/gesture>` extends dojo/touch.

Known Issues

If a device has both mouse and touch (like Blackberry phones or some high end desktop computers), dojo/touch will only monitor touch events; ideally it should be monitoring both.

Please see #13048. This will not be addressed until Dojo 2.0.

See Also

Jump to Line
Something went wrong with that request. Please try again.