{ "id": "100374", "key": "TIMOB-10985", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-01-03T03:27:07.000+0000", "created": "2012-09-04T05:40:48.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "exalture", "longpress", "parity", "singletap" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "27242", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "103470", "key": "TIMOB-13308", "fields": { "summary": "Android: KrollProxy not told of eventListener added", "status": { "description": "This issue is being actively worked on at the moment by the assignee.", "name": "In Progress", "id": "3", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "updated": "2018-01-03T03:27:07.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": "h6.Problem\r\nLooking at the logcat, I get that message every time I \"longpress\"\r\n\r\n- 09-04 14:45:26.052: W/TextView(623): TextView does not support text selection. Action mode cancelled.\r\n\r\nIf i get that message then I dont get the singletap event.\r\n\r\nh6.Tested on\r\nConfirmed on Samgsung Galaxy Tab Android OS 3.2\r\n\r\nh6.Test case\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\n\r\nvar label = Ti.UI.createLabel({\r\n text: 'Touch the Button!', textAlign: 'center',\r\n top: 0, right: 0, bottom: '50%', left: 0\r\n});\r\nwin.add(label);\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Update Label',\r\n top: '50%', right: 0, bottom: 0, left: 0\r\n});\r\nwin.add(button);\r\n\r\nvar launch = new Date().getTime();\r\nbutton.addEventListener('singletap', function() {\r\n label.text = parseInt((new Date().getTime() - launch) / 100) / 10 + ' seconds since app launched.';\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Holding button down cancels 'singletap' event listener", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 2.2.0 (master)\r\nAndroid OS 3.2", "comment": { "comments": [ { "id": "218689", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Not seeing the actual device this was tested on, but basically onSingleTap event is notified when a tap occurs with the up MotionEvent that triggered it.\r\n\r\nMotionEvent overview: Some devices can report multiple movement traces at the same time.\r\n\r\nhttp://developer.android.com/reference/android/view/MotionEvent.html\r\n\r\nDo you get the same result if using a click event listener?\r\n\r\n{code}\r\nvar button = Titanium.UI.createButton({\r\n title: 'Hello',\r\n top: 10,\r\n width: 100,\r\n height: 50\r\n});\r\nbutton.addEventListener('click',function(e)\r\n{\r\n Titanium.API.info(\"You clicked the button\");\r\n});\r\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-12T13:02:46.000+0000", "updated": "2012-09-12T13:02:46.000+0000" }, { "id": "219226", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-09-17T02:14:21.000+0000", "updated": "2012-09-17T02:14:21.000+0000" }, { "id": "219468", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-18T10:44:44.000+0000", "updated": "2012-09-18T10:44:44.000+0000" }, { "id": "219481", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samgsung Galaxy Tab Android OS 3.2.\r\n\r\nTo clarify: 'singletap' is not fired and the message \"TextView does not support text selection. Action mode cancelled.\" appears in logcat when holding the button down for longer than a tap gesture. It is fired with no message when tapping without holding.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-18T11:18:13.000+0000", "updated": "2012-09-18T11:18:13.000+0000" }, { "id": "219666", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Eduardo: You are right the 2 other bugs where on ios, yes. But in a multi platform situation, having singletap and click problems is not that good. That s what i wanted to point out.\r\n\r\nAs for the device, if i didnt mention device/simulator, is because it was clearly happening on both. Especially as i pointed out that it certainly was just a question of implementation.\r\n\r\nThanks for your feedback", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-09-18T23:30:13.000+0000", "updated": "2012-09-18T23:30:13.000+0000" }, { "id": "219742", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Format corrected, added the test device & parity label. Moving to Titanium Project to dig into it - it's potentially native behavior.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T10:24:21.000+0000", "updated": "2012-09-19T10:24:21.000+0000" }, { "id": "223757", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-10-16T10:42:12.000+0000", "updated": "2012-10-16T10:42:12.000+0000" }, { "id": "428247", "author": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "body": "Hi in your case the long press was handled by longpress event rather than singletap event.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#5ff' });\r\n\r\nvar label = Ti.UI.createLabel({\r\n text: 'Touch the Button!', textAlign: 'center',\r\n top: 0, right: 0, bottom: '50%', left: 0\r\n});\r\nwin.add(label);\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Update Label',\r\n top: '50%', right: 0, bottom: 0, left: 0\r\n});\r\nwin.add(button);\r\n\r\nvar launch = new Date().getTime();\r\nbutton.addEventListener('singletap', function() {\r\n label.text = parseInt((new Date().getTime() - launch) / 100) / 10 + ' seconds since app launched.';\r\n});\r\n\r\nbutton.addEventListener('longpress', function() {\r\n label.text = parseInt((new Date().getTime() - launch) / 100) / 10 + ' seconds longpress fired.';\r\n});\r\n\r\nwin.open();\r\n{code} ", "updateAuthor": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "created": "2017-09-21T14:45:59.000+0000", "updated": "2017-09-21T14:45:59.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }