Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14604 closed enhancement (fixed)

ListItem should respond to touch

Reported by: ykami Owned by: ykami
Priority: high Milestone: 1.8
Component: DojoX Mobile Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


ListItem (and other _ItemBase-based widgets) should be highlighted when the user touches it. The operation should be able to be canceled if the user drags a finger a little. To achieve this, touch events have to be handled instead of click events.

Change History (4)

comment:1 Changed 10 years ago by ykami

In [27598]:

Refs #14604 !strict. Use touchstart/touchmove/touchend instead of onclick to handle user's select operation. Some widget may want to invoke the action on touchstart. Some others may want to invoke it on touchend. This module supports such various cases.

comment:2 Changed 10 years ago by ykami

In [27619]:

Refs #14604 !strict. ListItem? responds to user's touch operation and changes to the selected color immediately. The color is restored after a little while. The action is invoked on touch-end. Also, deleteIcon was added.

comment:3 Changed 10 years ago by ykami

Resolution: fixed
Status: newclosed

comment:4 Changed 10 years ago by bill

In [28275]:

Manually generate click event from touchend event to avoid iOS/safari bugs when a click event doesn't occur after focus has been programatically shifted.

Right now the code is just listening for touchend events. dojox/mobile is doing something more complicated where it listens to touchstart, touchmove, and touchend. That's not needed on most dijit pages since touchmove just scrolls the document, while keeping the finger on the originally touched node. But maybe dijit will need to do it eventually for pages that trap touchmove and call evt.preventDefault(), thus allowing a user to touchstart somewhere random, slide to the node with the a11yclick handler, and then do a touchend.

Fixes #14918, refs #14604 !strict.

Note: See TracTickets for help on using tickets.