{ "id": "125668", "key": "TIMOB-16350", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-02-07T01:24:13.000+0000", "created": "2014-01-31T01:03:24.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "supportTeam" ], "versions": [ { "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" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T23:00:00.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": "h3. Request\r\n\r\nCustomer is asking us to provide longpress event at the same hierarchy level as the itemclick event, they have a listView item with multiple labels and they want to be able to longpress any of this labels and call a function depending on the label pressed.\r\n\r\nh3. Workaround\r\n\r\nWe currently have recommended to assign a longpress event listener to each label in the item template in order to be able to retrieve the source of the event, customer have commented they have a large number of components in my template that need to detect and they will prefer to have a single event listener.\r\n\r\n{code}\r\n\r\n \r\n \r\n\r\n{code}\r\n\r\nh3. Current Behavior\r\n\r\nIf we assign a longpress event from a view inside a item template in a listView this will return the information of the row (section and index) but no the one of the label being pressed.\r\n\r\n{code}\r\n\r\n \r\n \r\n\t \r\n\t \r\n\t \r\n\t\t\t \r\n\t \r\n\t \r\n\t \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nJS controller\r\n{code}\r\nfunction longCB(e){\r\n\t\r\n\t Ti.API.info(JSON.stringify(e));\r\n};\r\n{code}\r\n\r\nConsole log on longpress\r\n{code}\r\n[INFO] : {\"y\":17,\"sectionIndex\":0,\"section\":{\"id\":\"section\"},\"itemIndex\":4,\"x\":88,\"bubbles\":true,\"type\":\"longpress\",\"source\":{\"horizontalWrap\":true},\"cancelBubble\":false}\r\n{code}\r\n\r\nWhen calling the longpress event from a view outside the template this will return the information regarding the label calling the event.\r\n\r\n{code}\r\n\r\n \r\n\t\t \r\n\t\t \r\n\t \r\n \r\n{code}\r\n\r\nJS controller\r\n{code}\r\nfunction longCB(e){\r\n\t\r\n\t Ti.API.info(JSON.stringify(e));\r\n};\r\n{code}\r\n\r\nConsole log on longpress\r\n{code}\r\n[INFO] : {\"x\":27,\"y\":12,\"bubbles\":true,\"type\":\"longpress\",\"source\":{\"text\":\"test 2\",\"left\":60,\"id\":\"subheading\",\"horizontalWrap\":true,\"color\":\"black\",\"top\":25,\"bindId\":\"subheading\"},\"cancelBubble\":false}\r\n{code}", "attachment": [], "flagged": false, "summary": "ListView: Create a longpress event for listview that return the source of the event", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: Mobile 3.2GA\r\nPlatform OS: iOS\r\nPlatform OS Version: 7", "comment": { "comments": [ { "id": "291838", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "as [~srahim] mentioned, we can not add any event to the listView, all events are supported on childtemplate ", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2014-02-07T01:24:13.000+0000", "updated": "2014-02-07T01:24:13.000+0000" }, { "id": "415189", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:00:00.000+0000", "updated": "2017-03-22T23:00:00.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }