{ "id": "79108", "key": "TIMOB-4976", "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": [ { "id": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-06T13:01:18.000+0000", "created": "2011-08-10T09:27:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_textarea", "qe-testadded" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-14T14:12: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Getting unexpected behavior from a textArea. The purpose of this sample is to create an expandable text area. When you add 3 lines of text, tap on the window blur to the textArea, tap on the textArea to refocus, the text in the textArea will scroll up.\r\n\r\nStep 1: run the code below\r\nStep 2: enter 3 lines of text into the textArea\r\nStep 3: tap the window or press return to blur the textArea\r\nStep 4: tap on the textArea to focus on the textArea\r\nStep 5: notice the contents of the textArea will scroll up\r\n\r\n{code:title=\"app.js\"}\r\nvar textHeight;\r\n\r\nif (Ti.Platform.osname == 'iphone')\r\n\ttextHeight = 24;\r\nelse if (Ti.Platform.osname == 'android')\r\n\ttextHeight = 34;\r\n\r\nvar l1 = Titanium.UI.createLabel({\r\n height:'auto',\r\n\twidth:182,\r\n font:{fontSize:12,fontFamily:'ARIAL', fontWeight:'solid'},\r\n\tcolor:'#000',\r\n\ttextAlign:'left',\r\n\tborderWidth:0,\r\n\ttop:20,\r\n\tborderWidth:2,\r\n\tborderColor:'#bbb',\r\n\tborderRadius:10\t\r\n});\r\n\t\r\nvar tf = Titanium.UI.createTextArea({\r\n height:textHeight,\r\n\twidth:200,\r\n font:{fontSize:12,fontFamily:'ARIAL', fontWeight:'solid'},\r\n color:'#000',\r\n textAlign:'left',\r\n\tcolor:'#777',\r\n\tpaddingLeft:0,\r\n\tborderWidth:0,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_NONE,\r\n\ttop: 60,\r\n\tborderWidth:2,\r\n\tborderColor:'#bbb',\r\n\tborderRadius:10\r\n});\r\n\r\ntf.scrollable = false;\r\n\r\nvar last_height = tf.height;\r\n\r\ntf.addEventListener('change',function(e)\r\n{\r\n\tl1.text = tf.value;\r\n\r\n\tsetTimeout ( function () \r\n\t{\r\n\r\n\t\tif (e.value == \"\")\r\n\t\t\ttf.height = textHeight;\r\n\t\telse\r\n\t\t\ttf.height= (l1.height>textHeight) ? l1.height + 8 : textHeight;\r\n\t\t\t\r\n\t\tif (last_height != tf.height)\r\n\t\t\tonHeightChange();\r\n\r\n\t\tlast_height = tf.height;\r\n\t\t\r\n\t}\t,50);\r\n\t\r\n});\r\n\r\nfunction onHeightChange (){\r\n\tTi.API.info(\"add custom draw code\")\r\n}\r\n\r\nvar win1 = Titanium.UI.createWindow({backgroundColor:'white'});\r\nwin1.add(l1);\r\nwin1.add(tf);\r\nwin1.addEventListener('click', function(e){\r\n\ttf.blur();\r\n});\r\nwin1.open();\r\n{code}\r\n\r\nh4. Associated Helpdesk Ticket\r\nhttp://appc.me/c/RUT-47599-528", "attachment": [], "flagged": false, "summary": "iOS: unexpected behavior from expanding textArea", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.8.0.v20110808082608\r\niOS Simulator 4.3", "comment": { "comments": [ { "id": "185062", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending #1559", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-05T13:16:10.000+0000", "updated": "2012-03-05T13:16:10.000+0000" }, { "id": "186456", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120314090311\r\nTitanium Studio, build: 2.0.0.201203132050\r\nxcode: 4.2\r\nDevice: iphone 4s (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-14T12:32:09.000+0000", "updated": "2012-03-14T12:32:09.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }