Problem
TextField in a TableViewRow loses focus if it has been resized after being focused
Code and steps to reproduce
var win = Ti.UI.createWindow({
title:'pippo',
backgroundColor:'white'
});
function addRow(addTextArea)
{
var row = Ti.UI.createTableViewRow({height:200});
var $tTF = Ti.UI.createTextField({
height: 30,
top : 30,
width: 100,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
});
$tTF.addEventListener('focus',function(_e){
Ti.API.error("focus "+_e.source.height);
Ti.API.error(_e);
_e.source.animate({height: _e.source.height*2});
});
row.add($tTF);
row.selectionStyle = Ti.UI.iPhone.TableViewCellSelectionStyle.NONE;
row.className = 'control';
return row;
}
// create table view data object
var data = [];
for (var x=0;x<1;x++)
{
if (x==1){
data[x] = addRow(true);
} else {
data[x] = addRow();
}
}
var tableView = Ti.UI.createTableView({
data:data,
style: Titanium.UI.iPhone.TableViewStyle.GROUPED
});
win.addEventListener('focus', function()
{
Ti.API.info('window focus fired');
});
win.add(tableView);
win.open();
To reproduce:
- Run the app and click the textField: textField is animated increasing in height.
Result: focus on textField is lost.
Additional notes
Ticket associated for iOS:
http://support-admin.appcelerator.com/display/APP-995689/conversation/read_all
This will probably be fixed when TIMOB-8332 is resolved.
issue is reproduced with build 3.0.2 and 3.1.0 .
I too have the same issue in android device Sony Xperia U, I'm using TiSDK 3.0.2
Based on comments on TIMOB-8332, it sounds like this might be a "Won't fix"