{ "id": "97418", "key": "TIMOB-9979", "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": "13573", "description": "Sprint 2012-15 API", "name": "Sprint 2012-15 API", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-09T03:43:53.000+0000", "created": "2012-07-16T17:12:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableview", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:42:59.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": "The \"longpress\" event is inconsistent on iOS. \r\nif you don't see the issue the first time, keep running it again , within 4 to 5 times you should be able see the issue.\r\n\r\nh3.Steps to Reproduce.\r\n\r\nCopy the following code into app.js and run the app.\r\n\r\n{code:lang=JavaScript|title:app.js}\r\nvar win = Ti.UI.createWindow();\r\n \r\nvar tableData = []\r\nvar s = 0;\r\nvar nRow = 0;\r\nfor(var i = 0; i < 100; i++){\r\n var createNewSection = (i + 1) % 10 == 9 || i == 0 ? true : false;\r\n createNewSection ? nRow = 1 : nRow++;\r\n tableData.push({\r\n title:'Row #' + nRow + ' Index #' + i + ' Section #' + s,\r\n customProp:'Hello World! #' + i,\r\n header: createNewSection ? 'Section #' + s++ : null\r\n });\r\n}\r\n \r\nvar table = Ti.UI.createTableView({\r\n data: tableData\r\n});\r\n \r\nwin.add(table);\r\n \r\ntable.addEventListener('longpress', function(e){\r\n Ti.API.info('Section: ' + e.section);\r\n Ti.API.info('Row: ' + e.row);\r\n Ti.API.info('Row Data: ' + e.rowData);\r\n Ti.API.info('Index: ' + e.index);\r\n Ti.API.info('customProp: ' + e.rowData.customProp);\r\n});\r\n \r\nwin.open();\r\n{code}\r\n\r\nh3.Actual Result\r\n[INFO] Section:    undefined\r\n[INFO] Row:        undefined\r\n[INFO] Row Data:   undefined\r\n[INFO] Index:      undefined\r\n[WARN] Exception in event callback. {\r\n line = 27;\r\n message = \"'undefined' is not an object (evaluating 'e.rowData.customProp')\";\r\n name = TypeError;\r\n sourceId = 265738656;\r\n sourceURL = \"file://localhost/Users/srahim/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/CF8F7932-C2A4-477A-83DA-1E58F7FBC404/Titanium.app/app.js\";\r\n}\r\n\r\nh3.Expected Result(or similar to this)\r\n[INFO] Section:    [object TiUITableViewSection]\r\n[INFO] Row:        [object TiUITableViewRow]\r\n[INFO] Row Data:   [object TiUITableViewRow]\r\n[INFO] Index:      6\r\n[INFO] customProp: Hello World! #6", "attachment": [], "flagged": false, "summary": "iOS: Longpress event on TableView is not reliable.", "creator": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "208163", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Fixed by PR #2579 against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2579", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T14:25:00.000+0000", "updated": "2012-07-17T14:25:00.000+0000" }, { "id": "213510", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-09T03:42:49.000+0000", "updated": "2012-08-09T03:42:49.000+0000" }, { "id": "215986", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Exists on:\r\nTitanium Studio: 2.1.2.201208201549\r\nTitanium SDK: 2.1.2.v20120821160113\r\nDevice: iPad3(v5.1)\r\nFixed on SDK: 2.2.0", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T04:10:44.000+0000", "updated": "2012-08-24T04:10:44.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }