{ "id": "103368", "key": "AC-2120", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-02-05T00:08:15.000+0000", "created": "2012-10-14T17:19:26.000+0000", "labels": [ "parity" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:05.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Problem description*\r\nRunning the code below on iOS, you get TableView click when pressing on rows subviews. The event source is the subview but you still get the row property and the index. That's practical as you dont have to use \"touchEnabled\".\r\n\r\nOn Android you get the click event but not the row property. We should get that property too on android.\r\n\r\n*Test case*\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nwin.backgroundColor = '#ccc';\r\n\r\nvar tableview = Ti.UI.createTableView();\r\nwin.add(tableview);\r\n\r\nvar rowData = [];\r\nfor (var i = 0; i < 10; i++) {\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\ttitle : 'row ' + i,\r\n\t\tname : 'row ' + i\r\n\t});\r\n\tvar view = Ti.UI.createView({\r\n\t\twidth : 100,\r\n\t\theight : 30,\r\n\t\tbackgroundColor : 'blue'\r\n\t})\r\n\trow.add(view);\r\n\r\n\tvar view2 = Ti.UI.createLabel({\r\n\t\twidth : 50,\r\n\t\theight : 30,\r\n\t\tbackgroundColor : 'red'\r\n\t})\r\n\tview.add(view2);\r\n\trowData.push(row);\r\n};\r\ntableview.data = rowData;\r\n\r\ntableview.addEventListener('click', function(e) {\r\n\tif (e.row)\r\n\t\talert('we got a row! ');\r\n\telse\r\n\t\talert('we got a click but no row! ');\r\n})\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "35290", "filename": "Screenshot_2_4_13_4_04_PM.png", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-05T00:07:56.000+0000", "size": 77321, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: TableView click on subview", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.1.0 master\r\nAndroid 4.0.3\r\nSimulator / device", "comment": { "comments": [ { "id": "237150", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Martin,\nI tested this on the 4.0.3 android simulator and received a row on the click event, screenshot attached.", "updateAuthor": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-05T00:07:31.000+0000", "updated": "2013-02-05T00:07:31.000+0000" }, { "id": "237213", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Did you click on a subview?\nCause it s normal to see the dialog if you click on the row itself", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-02-05T13:40:41.000+0000", "updated": "2013-02-05T13:40:41.000+0000" }, { "id": "237232", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Martin,\r\n\r\nI tested this myself on an Android 2.3.3 device with 3.0 GA and 3.1 master, I also always get the row even when tapping on either subview...\r\n\r\nEdit: I guess I should test on a 4.0.3 device, but if it doesn't happen in the 4.0.3 emulator then...\r\n\r\nEdit2: Tested on a 4.2.1 device, still can't reproduce. I know it's not 4.0.3, but I'm not able to get my hands on that specific version right now. I'm going to conclude that it's very unlikely it will not work on 4.0.3. Maybe you have some custom code in your 3.1 build like you've realised in the past?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-05T17:54:52.000+0000", "updated": "2013-02-05T18:02:00.000+0000" }, { "id": "238524", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Daniel: sorry it took me so long to respond. I you cant reproduce just close it :s I am really sorry it must have been fixed somewhere. I also remember fixing it myself, but it s too far down the road :s\nSorry again", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-02-14T08:21:03.000+0000", "updated": "2013-02-14T08:21:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }