{ "id": "170985", "key": "AC-5553", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-02-08T04:53:06.000+0000", "created": "2018-01-26T14:10:54.000+0000", "labels": [ "android", "click", "textfield", "touch" ], "versions": [], "issuelinks": [ { "id": "56288", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "170994", "key": "TIMOB-25734", "fields": { "summary": "Android : TextField Click event is not firing with 7.0.X SDK", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-02-08T04:53:06.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": "TextField View on Android does not fire \"click\", \"singletap\", \"doubletap\", ...\r\nEvents are not fired even with editable = false\r\nIf TextField is set with touchEnable = false, events do not pass to the parent, no events are fired\r\n\r\nExample code:\r\n\r\n{code:java}\r\n\r\nvar cnt = $.UI.create(\"View\", {\r\n\tbackgroundColor: \"#FF0000\",\r\n\theight:Ti.UI.SIZE,\r\n\ttop: 100\r\n});\r\n\r\nvar tf = $.UI.create('TextField', {\r\n\theight: 40,\r\n\tbackgroundColor: \"#FFFFFF\",\r\n\tborderWidth: 1, borderColor: \"#000000\",\r\n\tleft: 40,\r\n\tright: 40,\r\n\ttop: 40,\r\n\tbottom: 40,\r\n\teditable: false,\r\n\ttouchEnabled: false\r\n});\r\n\r\n// Event on the parent element that emit the click event if directly touched\r\ncnt.addEventListener(\"click\", function()\r\n{\r\n\talert('Click CNT OK');\r\n});\r\n\r\ntf.addEventListener(\"click\", function()\r\n{\r\n\talert('Click TF OK');\r\n});\r\n\r\ntf.addEventListener(\"singletap\", function()\r\n{\r\n\talert('SingleTap TF OK');\r\n});\r\n\r\ntf.addEventListener(\"doubletap\", function()\r\n{\r\n\talert('DoubleTap TF OK');\r\n});\r\n\r\ntf.addEventListener(\"longpress\", function()\r\n{\r\n\talert('LongPress TF OK');\r\n});\r\n\r\n\r\ncnt.add(tf);\r\n$.win.add(cnt);\r\n\r\n\r\n$.win.open();\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: TextField do not fire touch events", "creator": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.12.6\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 8.9.3\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.0.14\r\nTitanium SDK\r\n SDK Version = 7.0.1.GA", "comment": { "comments": [ { "id": "433725", "author": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "body": "Hello\r\nwith SDK 7.0.1 click events do not occur even if touchEnabled = true and editable = true, virtually never\r\nWith touchEnabled = false, click not bubble to parent\r\nInitially i tried to set editable = false to check if click events are fired", "updateAuthor": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-01-26T17:02:36.000+0000", "updated": "2018-01-26T17:02:36.000+0000" }, { "id": "433726", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I wasn't able to reproducible the issue with your sample code, The click event in the view does fire. But the rest of the event does not since it's for the textfield and where \"editable: false,\r\nand touchEnabled: false. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-26T17:02:49.000+0000", "updated": "2018-01-26T17:03:25.000+0000" }, { "id": "433825", "author": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "body": "Click events on TextField are never fired (even with the following code).\r\nAlso with *touchEnabled: false* the event does not pass to the parent view.\r\n\r\n{code:java}\r\nvar tf = $.UI.create('TextField', {\r\n\theight: 40,\r\n\tbackgroundColor: \"#FFFFFF\",\r\n\tborderWidth: 1, borderColor: \"#000000\",\r\n\tleft: 40,\r\n\tright: 40,\r\n\ttop: 40,\r\n\tbottom: 40\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "sandrolain", "key": "sandrolain", "displayName": "Sandro Lain", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-01-30T11:37:36.000+0000", "updated": "2018-01-30T11:37:36.000+0000" }, { "id": "433830", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~sandrolain], Thanks for your reply, According to [docs|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextField-property-touchEnabled] with touchEnabled: false the event forward to peers, not to parents. Anyway, I was able to reproduce the issue for click event in textfield with the below code\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n color: '#336699',\r\n top: 10, left: 10,\r\n width: 250, height: 60\r\n});\r\n\r\ntextField.addEventListener(\"click\", function()\r\n{\r\n\talert('Click TF OK');\r\n});\r\n\r\nwin.add(textField);\r\nwin.open();\r\n{code}\r\n\r\nThere is an issue with click event in textfield, Moving to TIMOB. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-30T14:52:30.000+0000", "updated": "2018-01-30T14:55:56.000+0000" }, { "id": "434219", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-02-08T04:51:53.000+0000", "updated": "2018-02-08T04:51:53.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }