Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25414] iOS : Search bar in absolute-positioned ListView extends when focused

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-12-15T14:19:39.000+0000
Affected Version/sRelease 6.3.0, Release 6.2.2
Fix Version/sRelease 7.0.1
ComponentsiOS
Labelsios
Reportergeoffrey.noel
AssigneeVijay Singh
Created2017-10-19T09:40:45.000+0000
Updated2017-12-20T22:54:01.000+0000

Description

Attachments

FileDateSize
after focus.png2017-10-19T09:07:15.000+000071928
before focus.png2017-10-19T09:06:35.000+000072461
during focus.png2017-10-19T09:06:56.000+0000166540
TestSearchResult.zip2017-10-30T06:30:02.000+000031027

Comments

  1. Hans Knöchel 2017-10-19

    Hey there, thanks for this addition! So the search-results are framed properly, but the search-bar itself does use the wrong width?
  2. geoffrey.noel 2017-10-19

    Hi @Knöchel Yes, the search-results and the search bar are framed properly since the RC 6.3.0 but the search bar width is wrong
  3. Hans Knöchel 2017-10-19

    I am able to reproduce the issue, same for the Ti.UI.ListView:
               var data = [ { properties: {title : 'Bashful', hasDetail: true}}];
        
               var win = Ti.UI.createWindow( {
                   backgroundColor : 'white'
               } );
        
               var searchBar = Ti.UI.createSearchBar();
        
               var tableView = Ti.UI.createListView( {
                   backgroundColor : '#999',
                   searchView : searchBar,
                   sections : [Ti.UI.createListSection({items: data})],
                   top : 150,
                   bottom : 150,
                   left : 150,
                   right : 150
               } );
        
               win.add( tableView);
               win.open();
       
       
  4. Hans Knöchel 2017-10-23

    I tried some more use-cases and it looks like it's only occurring on iOS 11, not iOS 9 for example, which makes me think this might be a native behavior. The relevant calculation is done [here](https://github.com/appcelerator/titanium_mobile/blob/6_3_X/iphone/Classes/TiUIListView.m#L2184-L2189), so if you want to help speeding up the fix, let me know if you have an additional idea!
  5. Vijay Singh 2017-10-30

    This issue is happening only with iOS 11 and above, not in iOS 10 or iOS 9. I tried the same in native sample app attached as "TestSearchResult.zip" . It is also behaving in same way. It looks it is issue in iOS 11. We can file a ticket to apple. Though I am looking in this if I can found any workaround from our side.
  6. Vijay Singh 2017-11-01

    Filed a bug to apple - https://openradar.appspot.com/radar?id=4978709362638848
  7. Vijay Singh 2017-11-29

    PR (master) : https://github.com/appcelerator/titanium_mobile/pull/9635 PR (7_0_X) : https://github.com/appcelerator/titanium_mobile/pull/9657 Test Case1 -
              var data = [ { properties: {title : 'Bashful', hasDetail: true}}];
        
               var win = Ti.UI.createWindow( {
                   backgroundColor : 'white'
               } );
        
               var searchBar = Ti.UI.createSearchBar();
        
               var tableView = Ti.UI.createListView( {
                   backgroundColor : '#999',
                   searchView : searchBar,
                   sections : [Ti.UI.createListSection({items: data})],
                   top : 50,
                   bottom : 50,
                   left : 40,
                   right : 40
               } );
               win.add( tableView);
               win.open();
       
    Test Case 2-
        var data = [{title : 'Bashful', hasDetail: true}];
        
               var win = Ti.UI.createWindow( {
                   backgroundColor : 'white'
               } );
        
               var searchBar = Ti.UI.createSearchBar();
        
               var tableView = Ti.UI.createTableView( {
                   backgroundColor : '#999',
                   search : searchBar,
                   data : data,
                   top : 50,
                   bottom : 50,
                   left : 40,
                   right : 40
               } );
               win.add( tableView);
               win.open();
       
  8. geoffrey.noel 2017-12-01

    I tested both test case with the latest build from Thu Nov 30, 2017 13:50:12 --> http://builds.appcelerator.com/mobile/master/mobilesdk-7.1.0.v20171130135012-osx.zip The problem seems to be half resolved In first post, the states (see photos) : - Before focus was OK --> Still OK - During focus was faulty --> Now it's OK - After focus was faulty --> Still faulty When I blur the search bar, the right part seems to go away exactly like the "after focus" before the fix
  9. Vijay Singh 2017-12-04

    [~geoffrey.noel] This PR is not merged yet. Once it get merged, the problem will get solved. This ticket is scheduled for "Release 7.0.1" . Thanks!
  10. Eric Wieber 2017-12-12

    FR passed. Searchbar correctly resizes correctly after gaining and losing focus.
  11. Samir Mohammed 2017-12-20

    *Closing ticket.* Verified Fix in SDK version 7.0.1.v20171218104141 and 7.1.0.v20171220095337. Test and other information can be found at: PR (master) : https://github.com/appcelerator/titanium_mobile/pull/9635 PR (7_0_X) : https://github.com/appcelerator/titanium_mobile/pull/9657

JSON Source