{ "id": "101540", "key": "TIMOB-11003", "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": "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": "2013-03-19T10:58:14.000+0000", "created": "2012-09-19T15:19:00.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "exalture" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [], "assignee": { "name": "srikanthr", "key": "srikanthr", "displayName": "srikanth ravipati", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:25:31.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Issue\r\nWith a TextArea, one can programmatically set it to editable=false to commit the current autocompletion suggestion.\r\n\r\nWith a TextFiled, setting editable=false does not commit the autocompletion suggestion.\r\n\r\nh6.Reproduction steps\r\n1. Run sample code\r\n2. Type \"test\" into the TextArea (first field) - iOS will suggest \"Test\" (initial caps)\r\n3. Click the \"Get TextArea Value\" button, and \"Test\" is alerted and the value of the TextArea is updated to reflect the committed autocompletion suggestion.\r\n\r\nh6.Actual behavior\r\nIf you reproduce the above steps in the TextField (second field), the autocompletion suggestion is not committed.\r\n\r\nh6.Expected behavior\r\nTo have the TextField work like the TextArea, so that the TextField works like the iOS native Messages app, committing the autocompletion suggestion on a button click.\r\n\r\nh6.Tested on \r\niOS 5.1 simulator\r\n\r\nh6.Actual Sample\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n \ttitle: 'test',\r\n \tlayout: 'vertical'\r\n});\r\n\r\nvar txtArea = Ti.UI.createTextArea({\r\n\twidth: 300,\r\n\theight: 20,\r\n\ttop: 10\r\n});\r\nwin.add(txtArea);\r\n\r\nvar btnArea = Ti.UI.createButton({\r\n\ttitle: 'Get TextArea Value',\r\n\ttop: 10\r\n});\r\nwin.add(btnArea);\r\nbtnArea.addEventListener('click', function(){\r\n\ttxtArea.editable=false;\r\n\talert(txtArea.value);\r\n\ttxtArea.editable=true;\r\n});\r\n\r\nvar txtField = Ti.UI.createTextField({\r\n\twidth: 300,\r\n\theight: 16,\r\n\ttop: 30,\r\n\tbackgroundColor: 'white'\r\n});\r\nwin.add(txtField);\r\n\r\nvar btnField = Ti.UI.createButton({\r\n\ttitle: 'Get TextField Value',\r\n\ttop: 10\r\n});\r\nwin.add(btnField);\r\nbtnField.addEventListener('click', function(){\r\n\ttxtField.editable=false;\r\n\talert(txtField.value);\r\n\ttxtField.editable=true;\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "31519", "filename": "Autocomplete1.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T15:19:00.000+0000", "size": 73628, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: UITextField autocompletion suggestion is not committed", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 2.1.3\r\niOS 5.1", "comment": { "comments": [ { "id": "242881", "author": { "name": "srikanthr", "key": "srikanthr", "displayName": "srikanth ravipati", "active": true, "timeZone": "America/Los_Angeles" }, "body": "try with 3.2.1 could not reproduce.", "updateAuthor": { "name": "srikanthr", "key": "srikanthr", "displayName": "srikanth ravipati", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T10:58:14.000+0000", "updated": "2013-03-19T10:58:14.000+0000" }, { "id": "414440", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:25:31.000+0000", "updated": "2017-03-21T21:25:31.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }