Problem
When the user try to use the hardware keyboard, anytime that the user stroke a key, the textfield get's blurred,
Expected behavior
Use the hardware keyboard to introduce text into the text field with no problems
Notes
I'm using a eventlistener to catch anytime the textfield change, if I put a scrollView.scrollToBottom inside the event Listener, the blur event of the textField gets fired, if I comment the scrollToBottom, then, the user can use the hardware keyboard with no problems
Test case
var win = Titanium.UI.createWindow({ backgroundColor:'blue', modal:true, navBarHidden:true});
var textField = Ti.UI.createTextArea({
height:60,//hiddenLabel.height,
left:10,
right:10,
autocapitalization:Ti.UI.TEXT_AUTOCAPITALIZATION_SENTENCES,
top:5,
isFocused: false
});
var scrollView;
scrollView = Ti.UI.createScrollView({
left:0,
top:0,
right:0,
contentHeight:'auto',
backgroundColor: 'green'
});
textField.addEventListener('focus', function(e)
{
Ti.API.info('textField has been focused.');
textField.isFocused = true;
});
textField.addEventListener('blur', function(e)
{
Ti.API.info('textField has been blurred.');
textField.isFocused = false;
});
textField.addEventListener('change', function(e)
{
Ti.API.error('****************************** scrollview to bottom');
scrollView.scrollToBottom();
});
win.add(scrollView);
win.add(textField);
win.open();
This seems to be native behavior in android.
It looks like there is a focus() method on text area, so you may be able to force the textarea to gain focus after it has scrolled to the bottom.
Closing ticket as invalid.