Problem
When using a tableView with a searchBar in a modal window, the searchBar is obscured by the window title when the device is rotated to landscape. If the tableView is dragged down, the searchBar comes into view, but then springs back under the window title when released.
Also the first index, "0", is also obscured.
Note: this problems do not occur for non-modal windows.
Test case
Ti.UI.setBackgroundColor('#000');
var win1 = Ti.UI.createWindow({
title: 'win1',
backgroundColor: '#f00'
});
win1.open()
var win2 = Ti.UI.createWindow({
title: 'win2',
backgroundColor: '#0f0'
});
var searchBar = Ti.UI.createSearchBar();
var tableData = [];
var header = '';
var index = [];
for ( var i = 0; i <= 20; i++ ) {
var row = Ti.UI.createTableViewRow({
title: 'test'
});
index.push({
title: i+'',
index: i
});
tableData.push(row);
}
var table = Ti.UI.createTableView({
search:searchBar,
data:tableData,
index:index
});
win2.add(table);
win2.modal = true; //toggle this to introduce problem
win2.open();
Sindre Thank you for raising this - I have reproduced the issue on my system. Please note the changes I have made, particularly in reducing the code to its bare minimum. I will escalate this to the main project now. Cheers
Cannot reproduce with 3.0.0 build on iPad simulators (all versions)
Environment used for verification - Titanium SDK: 3.0.0.GA Titanium SDK: 3.1.0.v20130108153753 Titanium Studio: 3.0.1.201212181159 Since the search bar width get shortened of. There is separate bug for that(TIMOB-10585).