[dojo-contributors] desktop and mobile event consolidation

Bill Keese bill at dojotoolkit.org
Fri Oct 22 11:48:14 EDT 2010


 At DDD we talked about making the current dojo & dijit code (DnD,
Slider, ComboBox etc.) work on mobile. One approach (to solve part of
the problem) is to consolidate events so that a touchmove looks like a
mousemove (or something like that). Did someone say that wink had code
for this already and we should merge it?

My thought was to create new event names, for example:

dojo.connect(node, "move", function(){...})

would connect to both mousemove and touchmove, so that our code would
work on all devices, including blackberry and some fancy desktop
machines that support both touch and mouse.

Another approach is to make existing event names work for mobile, so that

dojo.connect(node, "mousemove", function(){...})

would _also_ connect to touchmove. That's a bit magical but the upside
is that existing code (including user code) will work w/out changes.

What do you think?



More information about the dojo-contributors mailing list