{ "id": "118651", "key": "TIMOB-14901", "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": [ { "id": "15597", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15599", "description": "2013 Sprint 17 API", "name": "2013 Sprint 17 API", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-08-17T01:35:33.000+0000", "created": "2013-08-16T12:02:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "ios", "qe-closed-3.1.3", "qe-testadded", "regression", "triage" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "31170", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "118689", "key": "TIMOB-14902", "fields": { "summary": "Android: ListView itemclick event broken in 3.1.2.GA", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "31169", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "114608", "key": "TIMOB-13914", "fields": { "summary": "Android: 'longpress' event is not working in ListView", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-06-05T09:20:13.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": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "*Problem*\r\nA button within a ListView does not trigger an 'itemclick' event when clicked.\r\n\r\nThese elements trigger a 'itemclick' event when clicked:\r\niOS: ImageView, Label\r\nAndroid: (none - only if the ListViewItem container is clicked directly an 'itemclick' event is triggered)\r\n\r\nUsing a click event listener on the button is no alternative at the moment due to this issue: TIMOB-13747.\r\n\r\n*Test case*\r\nThis is a slightly modified version of the ListView example from the documentation.\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\n// Create a custom template that displays an image on the left, \r\n// then a title next to it with a subtitle below it.\r\nvar myTemplate = {\r\n childTemplates: [\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n width: '50dp', height: '50dp', left: 0,\r\n }\r\n },\r\n { // Title \r\n type: 'Ti.UI.Label', // Use a label for the title \r\n bindId: 'info', // Maps to a custom info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'black',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '60dp', top: 0,\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'es_info', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'gray',\r\n font: { fontFamily:'Arial', fontSize: '14dp' },\r\n left: '60dp', top: '25dp',\r\n }\r\n },\r\n {\r\n \ttype: 'Ti.UI.Button',\r\n \tbindId: 'button',\r\n \tproperties: {\r\n \t\ttitle: 'Click',\r\n \t\tbackgroundColor: 'blue',\r\n \t\tbackgroundSelectedColor: 'red',\r\n \t\tleft: '200dp',\r\n \t\twidth: '60dp',\r\n \t\theight: '50dp'\r\n \t}\r\n }\r\n ]\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n // Maps myTemplate dictionary to 'template' string\r\n templates: { 'template': myTemplate },\r\n // Use 'template', that is, the myTemplate dict created earlier\r\n // for all items as long as the template property is not defined for an item.\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n // the text property of info maps to the text property of the title label\r\n // the text property of es_info maps to text property of the subtitle label\r\n // the image property of pic maps to the image property of the image view\r\n { info: {text: 'Apple'}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}},\r\n { info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables / Verduras'});\r\nvar vegDataSet = [\r\n { info: {text: 'Carrot'}, es_info: {text: 'Zanahoria'}, pic: {image: 'carrot.png'}},\r\n { info: {text: 'Potato'}, es_info: {text: 'Patata'}, pic: {image: 'potato.png'}}\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nvar grainSection = Ti.UI.createListSection({ headerTitle: 'Grains / Granos'});\r\nvar grainDataSet = [\r\n { info: {text: 'Corn'}, es_info: {text: 'Maiz'}, pic: {image: 'corn.png'}},\r\n { info: {text: 'Rice'}, es_info: {text: 'Arroz'}, pic: {image: 'rice.png'}}\r\n];\r\ngrainSection.setItems(grainDataSet);\r\nsections.push(grainSection);\r\n\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\n\r\nlistView.addEventListener('itemclick', function(evt) {\r\n\talert('Click on: ' + evt.sectionIndex + '/' + evt.itemIndex + '/' + evt.bindId);\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "ListView: A button within a ListView does not trigger an 'itemclick' event when clicked", "creator": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Ti SDK 3.2 CI\r\nAndroid 4.2.1 Nexus S\r\niOS Simulator 6.1", "comment": { "comments": [ { "id": "266963", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator and Samsung Galaxy S2 2.3.6 with Ti SDK 3.1.2 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-16T22:01:08.000+0000", "updated": "2013-08-16T22:01:08.000+0000" }, { "id": "266964", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-08-16T22:05:29.000+0000", "updated": "2013-08-16T22:07:09.000+0000" }, { "id": "266971", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just to clear up my confusion, you said \"for iOS there's a different issue described here: TC-2763\", yet that report describes Android?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-16T22:15:35.000+0000", "updated": "2013-08-16T22:15:35.000+0000" }, { "id": "266977", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah you're right it's a regression for Android (iOS behavior is the same on both SDK versions), I think I prefer this test case though, it covers more things. I might split it into a separate Android and iOS ticket.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-16T22:25:40.000+0000", "updated": "2013-08-16T22:26:28.000+0000" }, { "id": "266983", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Two separate issues IMO - so you can leave my test case for Android. Plus, it's also arguable if a button click in a list item should cause an itemclick event.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-08-16T22:35:20.000+0000", "updated": "2013-08-16T22:35:20.000+0000" }, { "id": "267003", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This regression is caused by [PR#4241|https://github.com/appcelerator/titanium_mobile/pull/4241].", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-16T23:45:34.000+0000", "updated": "2013-08-16T23:45:34.000+0000" }, { "id": "267020", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4580", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-17T00:28:37.000+0000", "updated": "2013-08-17T00:28:37.000+0000" }, { "id": "267022", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4581", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-17T00:35:21.000+0000", "updated": "2013-08-17T00:35:21.000+0000" }, { "id": "267045", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mokesmokes], you should be able to use the latest 3.1.X build from http://builds.appcelerator.com/#3_1_X to test and see if the issue is resolved for you.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-17T04:13:07.000+0000", "updated": "2013-08-17T04:13:07.000+0000" }, { "id": "267048", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Itemclicks now work, with https://github.com/appcelerator/titanium_mobile/pull/4580 in my code (I have a custom build based on 3.1.2 so didn't try your full release). I don't yet have buttons in my list items, so I can't test that part of this issue. Thanks for the fast fix! :)", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-08-17T07:54:37.000+0000", "updated": "2013-08-17T07:54:37.000+0000" }, { "id": "267098", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Used the code mentioned in the bug and verified on both iOS and Android platforms.\n\nBuilds Used - \n3.1.3 build - 3.1.3.v20130816184556\nMaster branch build - 3.2.0.v20130816180843\n\nObservations - \n1) For Android itemclick event of list view is triggered when all the three controls label,image and button are clicked on both the builds: 3.2.0.v20130816180843 and 3.1.3.v20130816184556. So its working as expected on Android platform.\n2) For iOS itemclick event of list view is not getting triggered on button click on both the builds: 3.2.0.v20130816180843 and 3.1.3.v20130816184556,that is bug still exist on iOS.\n\nVerified Environment:\nStudio: 3.1.2.201308091728\nacs:1.0.6\nalloy:1.2.1-cr\ntitanium:3.1.2\ntitanium-code-processor:1.0.2\nOS: OSX 10.8.4\nXcode:4.6.3\nDevices:iPhone5(v6.1.4), iPadMini (v6.0) and Android NEXUS 7(v4.3)\n", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-19T12:04:14.000+0000", "updated": "2013-08-19T12:04:14.000+0000" }, { "id": "267809", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\nUsed the code mentioned in the bug and verified on both iOS and Android platforms.\n\nBuilds Used - \n3.1.3 build - 3.1.3.v20130822140128\nMaster branch build - 3.2.0.v20130822140028\n\nObservations - \n1) For Android itemclick event of list view is triggered when all the three controls label,image and button are clicked on both the builds: 3.2.0.v20130822140028 and 3.1.3.v20130822140128. So its working as expected on Android platform.\n2) For iOS itemclick event of list view is not getting triggered on button click on both the builds: 3.2.0.v20130822140028 and 3.1.3.v20130822140128,that is bug still exist on iOS.\n\nVerified Environment:\nStudio: 3.1.3.201308201707\nacs:1.0.6\nalloy:1.2.1-cr\ntitanium:3.1.2\ntitanium-code-processor:1.0.2\nOS: OSX 10.8.4\nXcode:4.6.3, 5 beta 5\nDevices:iPhone5(v6.1.4), iPadMini (v6.0) and Android NEXUS 7(v4.3)", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-23T11:31:18.000+0000", "updated": "2013-08-23T11:31:18.000+0000" }, { "id": "267900", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the above code with:\nTitanium Studio, build: 3.1.3.201308201302\nTitanium SDk, build:3.1.3.v20130822140128\nCLI: 3.1.2\nalloy: 1.2.1-cr\nDevice:\nGalaxyS3 Android Version 4.0.4\nVerified a button within a ListView does trigger an 'itemclick' event when clicked.\n\n*for iOS behavior please refer to* http://docs.appcelerator.com/titanium/latest/#!/guide/ListViews", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-23T19:00:31.000+0000", "updated": "2013-08-23T19:00:31.000+0000" }, { "id": "454111", "author": { "name": "oakleaf", "key": "oakleaf", "displayName": "Mathias Eklöf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is still an issue with Ti SDK 8.3.1.\r\n\r\nButton inside listitem does not trigger event", "updateAuthor": { "name": "oakleaf", "key": "oakleaf", "displayName": "Mathias Eklöf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-07T08:39:10.000+0000", "updated": "2020-02-07T08:39:10.000+0000" }, { "id": "455651", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Please reopen, still present in 9.0.2GA", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2020-06-05T09:20:13.000+0000", "updated": "2020-06-05T09:20:13.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }