[TIMOB-25177] Windows: Click on button in ListItem does not fire itemClick event
| GitHub Issue | n/a |
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2017-09-18T05:05:18.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Windows |
| Labels | n/a |
| Reporter | Victor Vazquez Montero |
| Assignee | Kota Iguchi |
| Created | 2017-08-16T16:41:45.000+0000 |
| Updated | 2018-08-02T22:20:08.000+0000 |
Description
Description
In windows, if a ListItem has a button in it, clicking the button does not fire ListView's itemClick event.
Steps to reproduce:
Run the attached Alloy project - TestListViewButton
Click on rows in ListView outside button. Log statment will be printed as '[INFO] List View Item Click::: itemContainer'
Click on buttons in ListView rows. No log statement will be printed.
Attachments
I have tested this on iOS with Titanium SDK 6.1.2.GA, but this doesn't work even on iOS too. So I would resolve this as "Won't fix" or "Invalid" because we always treat iOS as "reference platform". [~vvazquezmontero] Could you confirm this with customer?
Thanks Kota I will share with the customer
[~vvazquezmontero] How about this; basic idea is to assign
idto the buttons and then addclickevent listener to the buttons, and then get the id value frome.source.id.(function init() { var listItems = [] $.listSection.items = []; for (var i = 0; i < 10; i++) { listItems.push({ template: 'template', itemContainer: { backgroundColor: (i % 2 === 0) ? 'red' : 'blue', }, button: { id: i, title: 'TEST ' + i } }); } $.listSection.items = listItems; })(); function onButtonClick(e) { alert(e.type + ' ' + e.source.id); } $.index.open();Thank you [~kiguchi] I will share with the customer
Resolving this as "Won't Fix" because this doesn't work even on iOS and we have a workaround for this. Feel free to create new feature request if customer thinks this as important feature.
Closing old "Won't fix" tickets. If you disagree, please reopen.