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

Android: TextField set in a listView headerView property loses focus once clicked

    Details

      Description

      Problem Description

      If a textField is set in a listView headerView property, it loses focus when clicked

      Steps to reproduce

      Sample code:

      var sections = [];
            
      var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
      var fruitDataSet = [
          {properties: { title: 'Apple', searchableText:' Fruits Apple', itemId:'0 0'}},
          {properties: { title: 'Banana', searchableText:'Fruits Banana', itemId:'0 1'}}
      ];
      fruitSection.setItems(fruitDataSet);
      sections.push(fruitSection);
       
      var tf = Ti.UI.createTextField({
              color: '#336699',
              height: 100,
              top:10,
              bottom:10,
              left:10,
              right:10,
              font:{fontSize:20,fontWeight:'bold'},
              hintText: 'Search'
          });
       
      // tf.addEventListener('change',function(e){
      //         listView.searchText = e.value;
      //  });
       
       
      var listView = Ti.UI.createListView({
      	top: 20,
      	headerView: tf
      });
      listView.sections = sections;
       
       
      var win = Ti.UI.createWindow({
      	backgroundColor:'black'
      });
       
      win.add(listView);
       
      win.open();
      

      1. Run the sample code on device
      2. Click on the textField
      Result: keyboard is shown but then focus is immediately lost, so is actually not possible to type in.

      Works as expected on iOS.
      Using 3.1.3.GA the textField is not displayed at all.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                fcasali Federico Casali
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code