Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25528] iOS: ListView with SearchBar issue with Ti SDK 6.3.0.GA

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-11-21T08:25:04.000+0000
Affected Version/sRelease 6.3.0
Fix Version/sRelease 7.0.0
ComponentsiOS
Labelsn/a
Reporter Ricardo Ramirez
AssigneeVijay Singh
Created2017-11-17T20:59:09.000+0000
Updated2017-11-28T20:31:26.000+0000

Description

Issue Description

We are having an issue with ListViews with SearchBar hiding behind the Navigation Bar when cancelling the search. Please see the details below for steps to re-create, screenshots, and a sample app. Note that this issue exists only with version 6.3.0.GA. App works without any issues with previous versions of the SDK. Steps to recreate: 1) Launch the sample app with Ti SDK 6.3.0.GA 2) Enter a search text in the search bar. For example, enter 'L' 3) Click on one of the list items to go to second window 4) On the second window, click on the back arrow to go to previous window 5) On the first window, notice that search text is still populated and search bar is visible 6) Click the cancel button on the search bar 7) Notice that search bar is hidden behind the navigation bar - This is the issue. Expected behavior is the search bar should be fully visible just below the navigation bar.

Attachments

FileDateSize
ListViewSearch-SampleApp2.zip2017-11-17T20:59:03.000+000010001129
Screen_Shot_2017-11-17_at_10.55.32_AM.png2017-11-17T20:59:02.000+000090034
Screen_Shot_2017-11-17_at_10.55.38_AM.png2017-11-17T20:59:01.000+000090482
Screen_Shot_2017-11-17_at_10.55.44_AM.png2017-11-17T20:59:02.000+000084399
Screen_Shot_2017-11-17_at_10.56.00_AM.png2017-11-17T20:59:02.000+000092521

Comments

  1. Vijay Singh 2017-11-21

    Test Case 1 (TiUIListView) :
       var rows = [];
       for (var i = 0; i < 20; i++) {
           rows.push({ properties: { title: 'Row '+ i , backgroundColor: 'red', searchableText:'Row '+i}});
       }
        
       var win = Ti.UI.createWindow({
         title: 'TEST',
         backgroundColor: '#ffffff',
       });
        
       var nav = Ti.UI.iOS.createNavigationWindow({ 
         window: win,
        });
        
        var testView = Ti.UI.createView({
           left : 20,
           right : 40
        });
       var sb = Ti.UI.createSearchBar();
        
       var ls = Ti.UI.createListSection({
         items: rows
       });
        
        var lv = Ti.UI.createListView({
           dimBackgroundForSearch: true,
           sections: [ls],
           searchView: sb,
       });
        
        testView.add(lv);
        
       sb.setHintText("test");
        sb.addEventListener('change', function(e){
         Ti.API.info(e.value);
       });
        
       sb.addEventListener('return', function(e){
         sb.blur();
       });
       lv.addEventListener('itemclick', function(e) {
         Ti.API.info('click at index: ' + e.itemIndex);
         var win1 = Ti.UI.createWindow({
         title: 'SecondWindow',
         backgroundColor: 'blue',
       });
       nav.openWindow(win1);
       });
        
       win.add(testView);
       nav.open();
       
    Test Case 2. (TiUITableView)
       var rows = [];
       for (var i = 0; i < 20; i++) {
           rows.push({ title: 'Row '+ i});
       }
       
       var win = Ti.UI.createWindow({
         backgroundColor: '#ffffff',
         layout : 'vertical'
       });
       
       var nav = Ti.UI.iOS.createNavigationWindow({ 
         window: win,
        });
       
       var sb = Ti.UI.createSearchBar();
        
       var lv = Ti.UI.createTableView({
           data: rows,
           search: sb,
       });
        
        sb.setHintText("test");
        sb.addEventListener('change', function(e){
         Ti.API.info(e.value);
       });
        
       sb.addEventListener('return', function(e){
       sb.blur();
       });
        
       sb.addEventListener('cancel', function(e){
       });
       lv.addEventListener('click', function(e) {
           Ti.API.info('click at index: ' + e.index);
        var win1 = Ti.UI.createWindow({
         title: 'SecondWindow',
         backgroundColor: 'blue',
       });
           nav.openWindow(win1); 
       })
        
       win.add(lv);
       nav.open();
       
  2. Hans Knöchel 2017-11-21

    Fixed as part of TIMOB-25491
  3. Eric Wieber 2017-11-28

    Closing as duplicate and fix verified in SDK build 7.0.0.v20171128115332

JSON Source