Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13110] IOS:Tableview with a search bar in IPad does not allow scrolling when button is clicked that forces the search bar to gain focus by : table.getSearch().focus() and also the search bar is nowhere to be seen

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.4, Release 3.0.0, Release 3.0.2, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
LabelssupportTeam
ReporterRupesh Sharma
AssigneeUnknown
Created2013-03-19T08:05:52.000+0000
Updated2018-02-28T20:03:26.000+0000

Description

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.

Comments

No comments

JSON Source