{ "id": "63897", "key": "TIMOB-3265", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-05-03T16:27:46.000+0000", "created": "2011-04-15T03:40:49.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "autosize", "feature", "ios", "rplist", "textarea" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:38: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": "{html}

Problem

\r\n

When using a textArea, there is no way to make the field auto\r\nexpand to fit the text. The only option is that the text will\r\nscroll. Label is able to produce the desired results. See test\r\ncode.

\r\n

Sample Code

\r\n
\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\nwidth:200,\r\nheight:'40',\r\ntop:10,\r\nvalue:'test'\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\nbackgroundColor:'#fff',\r\nwidth:200,\r\nheight:'auto',\r\ntop:60,\r\ntext:textArea.value\r\n});\r\n\r\nwin.add(textArea);\r\nwin.add(label);\r\n\r\ntextArea.addEventListener('change', function(e){\r\nlabel.text=e.value;\r\n});\r\nwin.open();\r\n
\r\n

Related Documentation

\r\n

Ticket Reference: http://developer.appcelerator.com/helpdesk/view/76226

{html}", "attachment": [], "flagged": false, "summary": "iOS: textArea height and width 'auto'", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "193657", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ticket does not describe an actual problem; describes desired behavior and additionally the test is incorrect. Layout also translates 'auto' and SIZE correctly for text fields now.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-03T16:27:47.000+0000", "updated": "2012-05-03T16:27:47.000+0000" }, { "id": "413943", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:38:31.000+0000", "updated": "2017-03-20T20:38:31.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }