{ "id": "167943", "key": "AC-4996", "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": "2017-06-02T19:01:54.000+0000", "created": "2017-05-26T00:19:28.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-02T19:01:54.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When setting touchEnabled=false (even temporarily) inside a singltap event handler, any click events also associated with the same view fail to fire.\r\n\r\nie. in the following code snippet, the click event used to fire in previous versions of titanium but it is now being suppressed\r\n\r\n{{var win = Ti.UI.createWindow();\r\nvar view = Ti.UI.createView({width: 100, height: 100, backgroundColor: 'blue'});\r\nview.addEventListener('singletap', function(){\r\n console.log('singletap captured');\r\n \r\n // Show a highlight effect on the view\r\n view.originalBackgroundColor = view.backgroundColor;\r\n view.backgroundColor = \"yellow\";\r\n view.touchEnabled = false;\r\n setTimeout(function() {\r\n view.backgroundColor = view.originalBackgroundColor;\r\n }, 70);\r\n setTimeout(function() {\r\n view.touchEnabled = true;\r\n }, 500);\r\n});\r\n\r\nview.addEventListener('click', function(){\r\n // In previous versions of Ti, this used to fire\r\n console.log('click captured');\r\n});\r\n\r\nwin.add(view);\r\nwin.open();\r\n}}", "attachment": [], "flagged": false, "summary": "Setting touchEnabled=false when catching singletap event is preventing click event", "creator": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "420575", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, This not a bug. If you set touchEnable, false to view it should not receive any touch event. See: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-touchEnabled", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-05-29T15:55:24.000+0000", "updated": "2017-05-29T15:55:24.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }