{ "id": "154817", "key": "TIMOB-20374", "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": "2016-04-05T04:27:26.000+0000", "created": "2016-02-09T06:58:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Android", "ScrollView", "longpress" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [], "assignee": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-21T18:41:49.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": "On Android the longpress event don't fire when longpress is performed directly on the ScrollView.\r\nIn the example below the longpress event is performed when long pressing on the \"red\" View in the ScrollView but don't fire when long pressing below the View directly on the green ScrollView.\r\n\r\nIf I change onLongpress with onClick the click event fires as expected.\r\n\r\n{code:title=index.xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n{code:title=index.js}\r\nfunction onLongPress(e) {\r\n\tTi.API.info('e:' + JSON.stringify(e));\r\n}\r\n$.index.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Longpress event on ScrollView doesn't fire", "creator": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "subtasks": [], "reporter": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "environment": "SDK 5.1.2.GA", "closedSprints": [ { "id": 614, "state": "closed", "name": "2016 Sprint 07 SDK", "startDate": "2016-03-26T00:38:56.432Z", "endDate": "2016-04-09T00:38:00.000Z", "completeDate": "2016-04-11T04:41:08.231Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "381430", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7912\r\n\r\nUse the following app.js for testing\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor:'white'});\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n\tbackgroundColor:'green',\r\n bottom:120,\r\n showVerticalScrollIndicator: true,\r\n \tshowHorizontalScrollIndicator: true,\r\n layout: 'vertical'\r\n});\r\n \r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor:'red',\r\n\twidth: 250,\r\n\theight:250\r\n});\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'blue',\r\n\twidth: 250,\r\n\theight:250\r\n});\r\n\r\nscrollView.add(view1);\r\nscrollView.add(view2);\r\n\r\nscrollView.addEventListener('longpress', function(e) {\r\n\tconsole.log('Long press on scrollview');\r\n});\r\n\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-04T09:16:58.000+0000", "updated": "2016-04-04T09:16:58.000+0000" }, { "id": "381679", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Updated code for testing to:-\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor:'white'});\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n\tbackgroundColor:'green',\r\n bottom:120,\r\n showVerticalScrollIndicator: true,\r\n \tshowHorizontalScrollIndicator: true,\r\n layout: 'vertical'\r\n});\r\n \r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor:'red',\r\n\twidth: 250,\r\n\theight:250\r\n});\r\n \r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'blue',\r\n\twidth: 250,\r\n\theight:250\r\n});\r\n \r\nscrollView.add(view1);\r\nscrollView.add(view2);\r\n \r\nscrollView.addEventListener('longpress', function(e) {\r\n\tconsole.log('Long press on scrollview:'+ e.x + '-'+e.y+'-'+e.type);\r\n});\r\n \r\nwin.add(scrollView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-05T04:26:06.000+0000", "updated": "2016-04-05T04:26:06.000+0000" }, { "id": "381680", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR reviewed and merged.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-05T04:27:17.000+0000", "updated": "2016-04-05T04:27:17.000+0000" }, { "id": "414305", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T18:41:49.000+0000", "updated": "2017-03-21T18:41:49.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }