Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8191] Android: TextField loses focus if resized

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.0.0, Release 1.8.2, Release 3.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterFederico Casali
AssigneeUnknown
Created2012-03-22T11:43:31.000+0000
Updated2018-03-06T18:57:59.000+0000

Description

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

Comments

  1. Josh Roesslein 2012-04-17

    This will probably be fixed when TIMOB-8332 is resolved.
  2. jithinpv 2013-02-26

    issue is reproduced with build 3.0.2 and 3.1.0 .
  3. Anand T 2013-04-09

    I too have the same issue in android device Sony Xperia U, I'm using TiSDK 3.0.2
  4. Ingo Muschenetz 2013-10-14

    Based on comments on TIMOB-8332, it sounds like this might be a "Won't fix"

JSON Source