Opened 11 years ago
Closed 11 years ago
#13605 closed defect (invalid)
DataList: ListItem.onClick() not Invoked if onClick handler is specified in data source
Reported by: | Ming Zhe Huang | Owned by: | ykami |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Mobile | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Please see the attached test_EdgeToEdgeDataList2.html. In the data source, onClick handler is defined for each list item. Open the test page and click each item, you'll find that blue background color is not applied (e.g. item not marked as clicked). However, if you remove the onClick hander in data souce, you'll find the blue background color will be applied after clicking. The root cause is that the onClick() handler defined in data source overwrites the original one.
The defined one should not overwrite the original one, instead it should be connected to the original one. A good example is how EdgeToEdgeList? handle onClick handler defined in template HTML. Please see test_EdgeToEdgeList-check2.html. Each time you click the list item, both the original handler and the specified handler are invoked.
Attachments (2)
Change History (4)
Changed 11 years ago by
Attachment: | test_EdgeToEdgeDataList2.html added |
---|
comment:1 Changed 11 years ago by
It is your application that overrides the default onClick handler. I don't think it is a good idea in the first place. How about handling onclick events from a list widget, not from each list item? You should be able to reach the clicked item.
comment:2 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please take a different approach.
test case