{ "id": "148640", "key": "AC-158", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-11-13T19:18:34.000+0000", "created": "2015-06-10T07:57:44.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-13T19:18:34.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "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": "Titanium.UI.TextField.setSelection(2, 10) when TextField.value.length = 49\r\n\r\nThe cursor is set to position 2 retrieved from (TextField.selection.location). However, the TextField.selection.length is 0.", "attachment": [], "flagged": false, "summary": "Titanium.UI.TextField.setSelection does not select the text", "creator": { "name": "meetamap", "key": "meetamap", "displayName": "Peng Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "meetamap", "key": "meetamap", "displayName": "Peng Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android version 5.1.1", "comment": { "comments": [ { "id": "363933", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Tested this issue In SDK 4.1.1.GA, Android version 5.1.1, Google Nexus 7. TextField.setSelection is working as expected. \r\n\r\nCODE SAMPLE\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: '#224466',\r\n top: 10, left: 10,\r\n width: 250, height: 60\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n title: 'Hello',\r\n top: 80,\r\n width: 100,\r\n height: 50\r\n});\r\n\r\nbutton.addEventListener('click',function(e)\r\n{\r\n textField.setSelection(2, 10);\r\n});\r\n\r\nwin.add(textField);\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\nYou can try to use the latest SDK if you still run into this error.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-15T09:31:55.000+0000", "updated": "2015-11-13T19:18:26.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }