{ "id": "126698", "key": "TIMOB-16489", "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": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-18T19:52:43.000+0000", "created": "2014-02-21T15:35:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "qe-testadded", "supportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-16T08:52:43.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\nAdding a 'longclick' event listener to a TableView will also fire the 'click' event if the row inside the TableView has a child view.\r\n\r\nh2. Steps to reproduce\r\n\r\n1. Use the code below\r\n2. Click on the row: 'click' is fired\r\n3. Long-click on the row: 'longclick' is fired, but also 'click'\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'white' });\r\nvar table = Ti.UI.createTableView({ minRowHeight : 40 });\r\nvar row = Ti.UI.createTableViewRow({\r\n className: 'row',\r\n touchEnabled: true,\r\n height: 200\r\n});\r\n\r\nvar view = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.FILL});\r\nrow.add(view);\r\ntable.setData([row]);\r\n\r\ntable.addEventListener('longclick', function(e) {\r\n alert(\"LONG CLICKED\");\r\n});\r\n\r\ntable.addEventListener('click',function(e) {\r\n\talert(\"CLICKED\");\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: TableView longclick event also fires click when row has view inside", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android 4.4.2\r\nNexus 5\r\nSDK 3.1.3.GA\r\nSDK 3.2.1.GA", "comment": { "comments": [ { "id": "297631", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/5488", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-17T21:31:51.000+0000", "updated": "2014-03-17T21:31:51.000+0000" }, { "id": "301083", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Click event does not fire with Longclick event.\r\n\r\nVerified on:\r\nOSX: 10.9.2\r\nSDK: 3.3.0.v20140414214115\r\nAppc Studio: 3.2.3.201404111117\r\nCLI:3.2.3-alpha3\r\nAndroid Device: Nexus5 (v4.4.2)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-16T08:52:43.000+0000", "updated": "2014-04-16T08:52:43.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }