Opened 7 years ago

Closed 7 years ago

#14428 closed defect (fixed)

dojox.mobile.ListItem onClick has no callback

Reported by: Eric Wang Owned by: ykami
Priority: high Milestone: 1.8
Component: DojoX Mobile Version: 1.7.0
Keywords: todoapp Cc:
Blocked By: Blocking:

Description

dojox.mobile.ListItem? onClick has no callback method.
In application, we need to click ListItem?, get the ListItem? id and pass the id to next view. However, ListItem? has no callback to implement, if provides the onClick function by

data-dojo-props="onClick: function(e){do something...}"

the default onClick function is overrided

Change History (3)

comment:1 Changed 7 years ago by cjolif

Keywords: todoapp added

comment:2 Changed 7 years ago by ykami

Status: newassigned

Thank you for the report. Actually I had been thinking of this issue too. I will rename the existing onClick method to _onClick, and create a new empty onClick method, which is called from _onClick, for a user defined handler. I believe this is what typical dijit widgets do. Also, to allow the user to override the onClick method, I will add handling of function-type parameters to dojox.mobile.parser.

comment:3 Changed 7 years ago by ykami

Resolution: fixed
Status: assignedclosed

In [27397]:

Fixes #14428 !strict Renamed onClick to _onClick, and added an empty onClick for user defined handler. dojox.mobile.parser now handles function-type parameters to allow the user to override onClick.

Note: See TracTickets for help on using tickets.