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

iOS7: SearchBar disappears when device rotates

    Details

      Description

      Problem description

      Device rotation impacts on the visualization of the search bar. The bar disappears if there is text in it and device is rotated, or if the search button on the virtual keyboard is pressed.

      Steps to reproduce

      Use this code:

      Titanium.UI.setBackgroundColor('#000');
      var tabGroup = Titanium.UI.createTabGroup();
      var win1 = Titanium.UI.createWindow({
          title : 'Table with Search'
      });
      var tab1 = Titanium.UI.createTab({
          title : 'Table w/ Search',
          window : win1
      });
       
      var allNoteTypes = [{
          title : 'Plan 1'
      }, {
          title : 'Plan 2'
      }, {
          title : 'Plan 3'
      }];
       
      var searchBar = Ti.UI.createSearchBar({
          barColor : "#283D5A"
      });
       
      var table = Ti.UI.createTableView({
          top : 0,
          width : "100%",
          backgroundColor : 'transparent',
          hideSearchOnSelection : false,
          data : allNoteTypes,
          search : searchBar
      });
       
      win1.add(table);
       
      tabGroup.addTab(tab1);
      tabGroup.open();
      

      There are two ways to replicate:

      1) focus the bar, write something, then rotate the screen
      2) focus the bar, write something and press return in the virtual keyboard

      Note

      Not sure if this can be considered related: the CANCEL button also stops working when the device is rotated. With the same code, focus the bar and rotate the screen: the CANCEL button stops working.

      The feature only come back when the app is restarted (e.g. rotating the device back does not help).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                dcassenti Davide Cassenti
                Reviewer:
                Sabil Rahim
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code