{ "id": "152076", "key": "TIMOB-19877", "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": null, "resolutiondate": null, "created": "2015-10-15T10:15:54.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "TextArea", "TextField", "editable", "engSchedule", "parity", "selectable" ], "versions": [ { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" }, { "id": "20791", "name": "Release 8.0.2", "archived": false, "released": true, "releaseDate": "2019-06-18" } ], "issuelinks": [], "assignee": null, "updated": "2019-10-28T05:14:54.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nWhile a {{TextArea}} object's property \"editable\" is set to {{false}}, end-users cannot tap to select text like how it works on iOS. This is a parity issue.\r\n\r\nNote that the {{TextArea}} is not disabled. The end-user can scroll the content. The issue is that no cursor is shown and it's impossible for the end-user to make cursor selections. (However, the {{setSelection()}} method works and text selections can be made programmatically.)\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# Tap and hold on a word in the {{TextArea}}.\r\n# Notice that no selection was made. _(This is the issue.)_\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar textArea = Ti.UI.createTextArea({\r\n\tvalue: \"Line 1\\nLine 2\\nLine 3\\nLine 4\\nLine 5\\nLine 6\\nLine 7\\nLine 8\",\r\n\teditable: false,\r\n\tsuppressReturn: false,\r\n\tleft: \"20dp\",\r\n\tright: \"20dp\",\r\n\theight: \"100dp\",\r\n});\r\nwindow.add(textArea);\r\nwindow.open();\r\n{code}\r\n\r\n*Note:*\r\nOn iOS, if {{TextField}} property \"editable\" is set {{false}}, then the end-user is unable to tap to select text either. So, in this case, both Android and iOS are in parity. I think this is the \"native\" iOS behavior, although it is inconsistent with iOS' own {{TextArea}} behavior.\r\n\r\n*Cause:*\r\nTitanium is calling {{setCursorVisible(false)}} in the Java {{TiUIText.handleKeyboard()}} method below.\r\n[TiUIText.java#L650|https://github.com/appcelerator/titanium_mobile/blob/3b75bf2b9f9733bca93ad22d738fea0525da9431/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java#L650]\r\n\r\nBut since iOS' {{TextField}} does not allow text selection while \"editable\" is {{false}}, Android should continue to call {{setCursorVisible(false)}} only for the single-line {{TextField}} case.\r\n", "attachment": [], "flagged": false, "summary": "Android: Cannot tap to select text in TextArea with \"editable\" set to false like iOS", "creator": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows Android SDK 3.5GA", "closedSprints": [ { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 631, "state": "closed", "name": "2016 Sprint 11 SDK", "startDate": "2016-05-21T00:06:10.029Z", "endDate": "2016-06-04T00:06:00.000Z", "completeDate": "2016-06-06T07:30:39.854Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "366932", "author": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "body": "is the bug resolved ? or any other solution to select text?", "updateAuthor": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-15T12:27:21.000+0000", "updated": "2015-10-15T12:27:21.000+0000" }, { "id": "367135", "author": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is any other Alternative solution for select text in Lable/TextArea? please suggest any solution.", "updateAuthor": { "name": "narenderreddich", "key": "narenderreddich", "displayName": "narender", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-19T13:09:47.000+0000", "updated": "2015-10-19T13:09:47.000+0000" }, { "id": "387304", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is because you set: \r\n{code}\r\neditable: false\r\n{code}\r\n\r\nOn Android, this will disable the Text Area, and you won't be able to select anything. Behavior may be different on iOS.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-01T18:41:43.000+0000", "updated": "2016-06-01T18:41:43.000+0000" }, { "id": "394492", "author": { "name": "botmaster", "key": "botmaster", "displayName": "Pascal", "active": true, "timeZone": "Europe/Berlin" }, "body": "\"Won't Fix\" ???\r\nCan you explain why? \r\nI think 'editable' is different from 'disable'.", "updateAuthor": { "name": "botmaster", "key": "botmaster", "displayName": "Pascal", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-26T12:38:03.000+0000", "updated": "2016-08-26T12:40:39.000+0000" }, { "id": "402878", "author": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not much help to get here I guess? Is there no way to be able to copy a small textarea or label? ", "updateAuthor": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-07T14:32:48.000+0000", "updated": "2016-12-07T14:32:48.000+0000" }, { "id": "421355", "author": { "name": "tokmakoff", "key": "tokmakoff", "displayName": "Andrew Tokmakoff", "active": true, "timeZone": "Australia/Adelaide" }, "body": "It seems this is potentially related to a known Android system issue and the SO article proposes a work-around. Perhaps that can be added to Titanium?\r\n\r\n[https://stackoverflow.com/questions/37566303/edittext-giving-error-textview-does-not-support-text-selection-selection-canc/38626276#38626276]\r\n[https://code.google.com/p/android/issues/detail?id=208169]\r\n\r\nI am encountering the same issue on 5.5.1 when I long-press on rows in a table. When I roll-back to 5.2.0, the issue goes away.\r\n\r\n\r\n", "updateAuthor": { "name": "tokmakoff", "key": "tokmakoff", "displayName": "Andrew Tokmakoff", "active": true, "timeZone": "Australia/Adelaide" }, "created": "2017-06-08T01:34:46.000+0000", "updated": "2017-06-08T01:36:12.000+0000" }, { "id": "439715", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Checking on this one\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-02T22:13:20.000+0000", "updated": "2018-08-02T22:13:20.000+0000" }, { "id": "452285", "author": { "name": "appsol", "key": "appsol", "displayName": "Muhammad Qasim", "active": true, "timeZone": "Asia/Karachi" }, "body": "Its strange that this issue is pending since 2015. There must be some solution as text based applications are useless without this feature.", "updateAuthor": { "name": "appsol", "key": "appsol", "displayName": "Muhammad Qasim", "active": true, "timeZone": "Asia/Karachi" }, "created": "2019-10-28T05:14:54.000+0000", "updated": "2019-10-28T05:14:54.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }