Description
On click of a "Search" button, it forces the search bar to gain focus by : table.getSearch().focus(). But, when on scrolling the table down, and click on the Search button causes the screen to blur sometimes but the search bar is nowhere to be seen. Although the search bar gains focus (evident from keyboard scrolling up).
Also, the content of the table view not able to scroll up. While the same code runs fine in iPhone.
Steps to reproduce :
1. Please use the below code in app.js:
var win1 = Titanium.UI.createWindow();
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Sample Window'
});
var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'}, {title: 'Potatoes'}, {title: 'Potatoes'} ]; // add some more data so that to scroll on IPad
var serachbar = Titanium.UI.createSearchBar({
});
var table = Ti.UI.createTableView({
data: tableData,
searchHidden : true,
hideSearchOnSelection : false,
search : serachbar
});
win2.add(table);
var test = Ti.UI.createButton({
title : 'serach'
});
test.addEventListener('click', function(){
table.getSearch().focus();
});
var nav = Titanium.UI.iPhone.createNavigationGroup({
window: win2
});
win2.rightNavButton = test;
win1.add(nav);
win1.open();
2. Run the application in iPad Simulator.
3. Scroll the table to some extent so that the search bar scrolls up. Click the "Search" button.Now you will not be able to scroll through the content and also the search bar is nowhere to be seen.
No comments