{ "id": "130875", "key": "AC-1415", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-07-15T16:54:22.000+0000", "created": "2014-05-25T21:36:41.000+0000", "labels": [ "longclick", "tableview", "tableviewrow" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:50.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": [], "description": "I am a little bit confused right now because the documentation doesn't include anything about \"longpress\" event for a TableViewRow. The problem is that it works ,but only if event listener is added to a TableView otherwise it is ignored and it shouldn't be.\r\n\r\n*index.js*\r\n{code:javascript}\r\n$.row.addEventListener(\"longpress\", function(e){\r\n\tconsole.log(\"ROW LONGPRESS EVENT FIRED, ROW ID: \", e.index);\r\n});\r\n\r\n$.index.open();\r\n{code}\r\n\r\n*index.xml*\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nh1. Steps:\r\n1. Try to hold your finger / cursor on the first row. No event will be fired.\r\n2. Modify the index.js file and repeat the first step. In this case everything works as expected however the problem is that $.table.addEventListener is completely pointless.\r\n\r\n*Modified index.js*\r\n{code:javascript}\r\n$.table.addEventListener(\"longpress\", function(e) {\r\n\tconsole.log(\"TABLE LONGPRESS EVENT FIRED, ROW ID: \", e.index);\r\n});\r\n\r\n$.row.addEventListener(\"longpress\", function(e) { // Only the first row for test purpose\r\n\tconsole.log(\"ROW LONGPRESS EVENT FIRED, ROW ID: \", e.index);\r\n});\r\n\r\n$.index.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "TableViewRow - longpress event doesn't work properly", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti 3.2.2.GA (Tested only using iOS Simulator, Version 7.0 (463.9.4.2))", "comment": { "comments": [ { "id": "308595", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "longpress event is available on TableView but not on TableViewRow. Here is the documentation link:\r\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewRow\r\n\r\nYou should add longpress event handler on TableView itself and use rowindex property to determine the row number.\r\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableView-event-longpress\r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T04:39:19.000+0000", "updated": "2014-06-12T04:39:19.000+0000" }, { "id": "308954", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I know that, the problem is that longpress event does work ,but only if there is another longpress event added to a TableView. ", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-13T19:47:17.000+0000", "updated": "2014-06-13T19:47:17.000+0000" }, { "id": "314185", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid bug. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-15T16:54:22.000+0000", "updated": "2014-07-15T16:54:22.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }