Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25287

iPhone X: Ti.UI.SearchBar in list-view get wrongly positioned

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 6.2.0
    • Fix Version/s: Release 6.3.0
    • Component/s: iOS
    • Labels:

      Description

      While looking in TIMOB-25271, I found that when search started in list view in iPhone X, search bar get placed at wrong position.

      Test Case-

      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 sb = Ti.UI.createSearchBar();
       
      var ls = Ti.UI.createListSection({
        items: rows
      });
       
       var lv = Ti.UI.createListView({
          top : 0,
          sections: [ls],
          searchView: sb,
          resultsBackgroundColor: 'green',
          resultsSeparatorColor: 'blue'
      });
       
      sb.setHintText("test");
       sb.addEventListener('change', function(e){
        Ti.API.info(e.value);
      });
       
       //when the return key is hit, remove focus from our searchBar
      sb.addEventListener('return', function(e){
        sb.blur();
      });
      lv.addEventListener('itemclick', function(e) {
          Ti.API.info('click at index: ' + e.itemIndex);
      });
       
      win.add(lv);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                vijaysingh Vijay Singh
                Reviewer:
                Hans Knöchel
                Tester:
                Eric Wieber
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-11147
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code