{ "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\n

To 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

\r\n

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\n

HD ticket:
\r\nhttp://developer.appcelerator.com/helpdesk/view/69941

\r\n

Ti SDK 1.6 (Feb 2 2011 15:24 ra02f7db3)
\r\niPhone simulator 4.2

{html}", "attachment": [], "flagged": false, "summary": "iOS clearOnEdit on textFiled clears value but retains info", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "194776", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Unable to reproduce using 2.0.1GA2 on the iOS simulator. Ticket closed.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-14T16:45:00.000+0000", "updated": "2012-05-14T16:45:00.000+0000" }, { "id": "207824", "author": { "name": "kasanbekov", "key": "kasanbekov", "displayName": "Kanat Asanbekov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested with:\r\nTitanium Studio, build: 2.1.1.201207121732\r\nTitanium SDK: 2.2.0.v20120716092112\r\nDevices: iPod Newton 4.3.5, iPhone 4S 5.1", "updateAuthor": { "name": "kasanbekov", "key": "kasanbekov", "displayName": "Kanat Asanbekov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T14:32:52.000+0000", "updated": "2012-07-16T14:32:52.000+0000" }, { "id": "207827", "author": { "name": "kasanbekov", "key": "kasanbekov", "displayName": "Kanat Asanbekov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For QE, use this code:\r\n{code}\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 width: 200,\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{code}\r\n", "updateAuthor": { "name": "kasanbekov", "key": "kasanbekov", "displayName": "Kanat Asanbekov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T14:34:42.000+0000", "updated": "2012-07-16T14:34:42.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }