[TIMOB-9567] Android: TextField: Blur event fires for text field added to a tableviewrow on rotation of device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.1.0, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, qe-and060112, reprod |
Reporter | Satyam Sekhri |
Assignee | Unknown |
Created | 2012-06-15T03:59:57.000+0000 |
Updated | 2018-02-28T20:03:56.000+0000 |
Description
On rotation of device from Portrait to Landscape or vice-versa, an text field that has focus gets blur. This happens for text field added to a TableViewRow
This is not a regression. This behavior occurs on 1.8.2 also
Steps to Reproduce:
1. Create an application with the code below
2. Launch the application
3. Click on the text field. The field gets focus and softkeyboard is shown
4. Rotate the device
Actual:
The blur event for the text field is fired
Expected: The focus on text field should continue
var win = Ti.UI.createWindow({
softInputMode : (Titanium.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : '',
windowSoftInputMode : (Titanium.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : ''
});
var tf1 = null;
var row = Ti.UI.createTableViewRow({
backgroundColor: "#000",
height : 80
});
tf1 = Titanium.UI.createTextField({
backgroundColor: "#fff",
width : 250,
height : 80,
});
tf1.addEventListener('focus', function() {
alert('Focus fired');
});
tf1.addEventListener('blur', function() {
alert('Blur fired');
});
row.add(tf1);
var tableView = Ti.UI.createTableView();
tableView.appendRow(row);
win.add(tableView);
win.open();
issue is reproduced with sdk version 3.0.2 and 3.1.0 .
I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131