{ "id": "102533", "key": "TIMOB-11237", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-02T20:25:57.000+0000", "created": "2012-10-02T20:23:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:15.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": "h3. The problem\r\nThis issue only appears if there is a view in the rows. If there is no view in the rows, then the table functions as expected. \r\n\r\nh3. Repro steps\r\n\r\n1. Press down on a table row causing it to highlight.\r\n2. Drag the table row without releasing to view later rows.\r\n3. Release the drag and click on a different row. \r\n4. The row that was selected previously will be the row that receives the click event.\r\n\r\nh3. The code:\r\n{code}\r\n var win = Ti.UI.createWindow({\r\n backgroundColor:'white',\r\n });\r\n\r\n var table = Ti.UI.createTableView({\r\n width: 320, \r\n height: 255,\r\n separatorColor :'transparent',\r\n separatorStyle:Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,\r\n style:Titanium.UI.iPhone.TableViewStyle.GROUPED,\r\n backgroundColor:'transparent',\r\n backgroundSelectedColor:'transparent',\r\n focusable: false,\r\n top:0,\r\n bottom: 0\r\n });\r\n var tableRows = [];\r\n \r\n for(var i = 0; i < 6; i++) {\r\n var row = Titanium.UI.createTableViewRow({\r\n height: 60\r\n });\r\n var view = Ti.UI.createView({\r\n top:5, right:5, left: 5, bottom:5,\r\n backgroundColor: '#ccc'\r\n });\r\n \r\n var label = Ti.UI.createLabel({\r\n text:'This is row: ' + i,\r\n top:10,\r\n left:10\r\n });\r\n \r\n view.add(label);\r\n row.add(view);\r\n tableRows.push(row);\r\n }\r\n table.setData(tableRows);\r\n \r\n table.addEventListener('click', function(e) {\r\n alert(e.index);\r\n });\r\n win.add(table);\r\n win.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS TableView fires wrong row click event", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.2.GA\r\niOS any version", "comment": { "comments": [ { "id": "221775", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested with 3.x on CI Build and it is working properly, closing ticket for now.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-02T20:25:57.000+0000", "updated": "2012-10-02T20:25:57.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }