[TIMOB-9947] Android: TextField loses focus if resized
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-06-27T18:30:37.000+0000 |
Affected Version/s | Release 2.1.0, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api |
Reporter | Shyam Bhadauria |
Assignee | Eric Merriman |
Created | 2012-07-12T04:55:53.000+0000 |
Updated | 2017-06-27T18:30:37.000+0000 |
Description
TextField in a TableViewRow loses focus if it has been resized after being focused
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 do following steps:
1.Run the app and click the textField:
Expected result :
1. textField is animated increasing in height and remains focused.
Actual Result:
1. focus on textField is lost.
Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2
I am unable to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131