{ "id": "63670", "key": "TIMOB-3038", "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": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-22T21:02:23.000+0000", "created": "2011-04-15T03:35:15.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "module_textfield", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-13T13:29:41.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}
Simple test:
\r\n\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar field = Titanium.UI.createTextField({\r\n color:'#000',\r\n font:{fontSize:16,fontWeight:'bold', fontFamily:'Arial'},\r\n backgroundColor:'#fff',\r\n borderColor:'#000',\r\n value:'',\r\n height:50,\r\n top:10,\r\n clearOnEdit:true\r\n});\r\nvar button = Ti.UI.createButton({top:100,width:200,height:50,title:'here'});\r\nwin.add(field);\r\nwin.add(button);\r\n\r\nfield.addEventListener('focus',function(e){\r\n alert('textfield value: '+e.value);\r\n});\r\n\r\nbutton.addEventListener('click',function(e){\r\n field.blur();\r\n alert('textfield value: '+field.value);\r\n});\r\n\r\n\r\nwin.open();
\r\n
\r\nTo reproduce:
\r\n1. click on the text field and type something
\r\n2. click on the button to see the text field value
\r\n3. click on the text field again and the value is gone as expected\r\n(do not type anything)
\r\n4. click on the button again and you'll see the old text field's\r\nvalue
The alert on focus will show the value of the text field, which\r\nis gone on focus as expected, but mysteriously reappears\r\nafterwards.
\r\nHD ticket:
\r\nhttp://developer.appcelerator.com/helpdesk/view/69941
Ti SDK 1.6 (Feb 2 2011 15:24 ra02f7db3)
\r\niPhone simulator 4.2