[TIMOB-3038] iOS clearOnEdit on textFiled clears value but retains info
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-05-22T21:02:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 2.0.1 |
Components | iOS |
Labels | module_textfield, qe-testadded |
Reporter | Pedro Enrique |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:35:15.000+0000 |
Updated | 2012-08-13T13:29:41.000+0000 |
Description
Simple test:
var win = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var field = Titanium.UI.createTextField({
color:'#000',
font:{fontSize:16,fontWeight:'bold', fontFamily:'Arial'},
backgroundColor:'#fff',
borderColor:'#000',
value:'',
height:50,
top:10,
clearOnEdit:true
});
var button = Ti.UI.createButton({top:100,width:200,height:50,title:'here'});
win.add(field);
win.add(button);
field.addEventListener('focus',function(e){
alert('textfield value: '+e.value);
});
button.addEventListener('click',function(e){
field.blur();
alert('textfield value: '+field.value);
});
win.open();
To reproduce:
1. click on the text field and type something
2. click on the button to see the text field value
3. click on the text field again and the value is gone as expected
(do not type anything)
4. click on the button again and you'll see the old text field's
value
The alert on focus will show the value of the text field, which is gone on focus as expected, but mysteriously reappears afterwards.
HD ticket:
http://developer.appcelerator.com/helpdesk/view/69941">http://developer.appcelerator.com/helpdesk/view/69941
Ti SDK 1.6 (Feb 2 2011 15:24 ra02f7db3)
iPhone simulator 4.2
Unable to reproduce using 2.0.1GA2 on the iOS simulator. Ticket closed.
Closing as fixed. Tested with: Titanium Studio, build: 2.1.1.201207121732 Titanium SDK: 2.2.0.v20120716092112 Devices: iPod Newton 4.3.5, iPhone 4S 5.1
For QE, use this code: