{ "id": "119077", "key": "TIMOB-15213", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-06-05T10:30:42.000+0000", "created": "2013-08-27T06:49:37.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2020-06-05T10:30:43.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Listview template for row,\r\n1, each row contains a view (row_view) as ChildTemplate.\r\n2, each view (row_view) is set \"event : { click : row_click }\"\r\n3, each view (row_view) contains a view (sw_view) as ChildTemplate\r\n4, each view (sw_view) contains 2 ImageView as ChildTemplate\r\n\r\nONLY when I click on row_view, the function row_click is triggered.\r\nWhen I click on sw_view, the function row_click is NOT triggered.\r\nWhen I click on the innermost ImageViews, the function row_click is NOT triggered.\r\n\r\n\r\nIn Android, click on any of the components will trigger row_click function.\r\n\r\n\r\n\r\n\r\n\r\n{code}\r\nvar _templates = {};\r\n\r\nvar _section_count = 10;\r\nvar _listview_w = Ti.UI.FILL;\r\n\r\nvar fixTemplate = {\r\n properties : {\r\n accessoryType : Ti.UI.LIST_ACCESSORY_TYPE_NONE,\r\n selectionStyle : Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE,\r\n width : _listview_w,\r\n height : 50,\r\n backgroundColor : '#0000FF',\r\n },\r\n childTemplates : [\r\n {\r\n type : 'Ti.UI.View',\r\n bindId : 'row_view',\r\n properties : {\r\n width : _listview_w,\r\n height : 48,\r\n right : 0,\r\n backgroundColor : '#CCCCCC',\r\n backgroundSelectedColor : '#dff0ff',\r\n },\r\n events: {\r\n click : row_click\r\n },\r\n childTemplates : [\r\n {\r\n type : 'Ti.UI.View',\r\n bindId : 'sw_view',\r\n properties : {\r\n width : 48,\r\n height : 48,\r\n right : 0,\r\n backgroundColor : '#666666',\r\n backgroundSelectedColor : '#dff0ff',\r\n },\r\n childTemplates : [\r\n {\r\n type : 'Ti.UI.ImageView',\r\n bindId : 'sw_right_off',\r\n properties : {\r\n image : '/images/button_select_up.png',\r\n backgroundColor : 'transparent',\r\n visible : false,\r\n }\r\n },\r\n {\r\n type : 'Ti.UI.ImageView',\r\n bindId : 'sw_right_on',\r\n properties : {\r\n image : '/images/button_select_down.png',\r\n backgroundColor : 'transparent',\r\n visible : false,\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}\r\n\r\n_templates[\"fixTemplate\"] = fixTemplate;\r\n\r\n\r\n\r\n\r\n\r\nfunction row_click(e) {\r\n Ti.API.debug(\"--------------------------------------------------------------------- : \" + e.type + \", \" + e.bindId);\r\n}\r\n\r\n\r\n\r\n\r\nvar _sections = [];\r\nvar _data = [];\r\nfor (var i = 0; i < _section_count; i++) {\r\n _data.push({\r\n template : \"fixTemplate\",\r\n });\r\n}\r\nvar section = Ti.UI.createListSection({\r\n items : _data,\r\n});\r\n_sections.push(section);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor: '#F0F0F0'});\r\n\r\nvar listView = Ti.UI.createListView({\r\n templates : _templates,\r\n defaultItemTemplate : 'fixTemplate',\r\n properties : {\r\n width : 300,\r\n }\r\n});\r\n\r\nlistView.sections = _sections;\r\n\r\nwin.add(listView);\r\n\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS ListView - events on inner children are not triggered in iOS listview", "creator": { "name": "pantherqin", "key": "pantherqin", "displayName": "pantherqin", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pantherqin", "key": "pantherqin", "displayName": "pantherqin", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS Simulator iOS6.1\r\nTitanium 3.1.2GA", "comment": { "comments": [ { "id": "400492", "author": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Any news on this? I am also experiencing this issue.", "updateAuthor": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-11-07T12:59:18.000+0000", "updated": "2016-11-07T12:59:18.000+0000" }, { "id": "455652", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Closing because this is expected behaviour. You have to monitor {{itemclick}} on the listview and determine what was clicked based on {{bindId}}", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-05T10:30:42.000+0000", "updated": "2020-06-05T10:30:42.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }