[TIMOB-8719] iOS: iPad: TableView: Soft keyboard does not appear and last row is not focused in landscape mode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-05-11T16:07:42.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, qe-ios040912 |
Reporter | Tamila Smolich |
Assignee | Neeraj Gupta |
Created | 2012-04-13T11:30:21.000+0000 |
Updated | 2017-03-09T23:28:04.000+0000 |
Description
Description:
Soft keyboard does not appear and last row is not focused if test case launched in landscape mode.
This bug occurs on 1.8.2 and 2.0.0.
Steps:
Run the following code on iPad in landscape mode:
var win = Ti.UI.createWindow({ title: 'Focus Test', backgroundColor: '#fff' });
var rows = [];
for (var i = 0; i < 20; i++) {
var row = Ti.UI.createTableViewRow({
height: 40
});
row.add(row.textField = Titanium.UI.createTextField({
value: 'Last row focused; Scroll up, and then try to scroll back down.',
color: '#000',
top: 5, right: 10, bottom: 5, left: 10,
borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
}));
rows.push(row);
}
win.add(Ti.UI.createTableView({
data: rows
}));
win.addEventListener('open', function() {
rows[rows.length - 1].textField.focus();
});
win.open();
Expected result:
The app automatically focuses the last row in the table view, popping up the keyboard
Actual result:
Soft keyboard does not appear and last row is not focused
You can not focus a field that is not attached to the view. If the use case is that you need to attach a field that is off screen use a container that guarantees all children are attached (eg: ScrollVIew). Tableview optimizations include only loading rows that are currently visible.
Closing ticket as invalid.