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

iOS: TabGroup - TabGroup focus event is not fired when setActiveTab is called on the first tab for the first time

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 3.0.0
    • Component/s: iOS
    • Labels:
    • Environment:

      SDK: 3.0.0.v20121105141612
      Studio: 2.1.3.201209111418
      Devices: iPhone4s(v 5.1)
      OS: OSX 10.8

      Description

      TabGroup focus event is not fired when setActiveTab is called on the first tab for the first time.
      This is not regression since the issue occurs as far as 2.1.2 GA as well.

      Steps to reproduce:

      1. Create an app with the code below.
      2. Launch the app and see the logs.

      Expected:
      Log message should be printed for the first time also.

      Actual behavior:
      Log is not printed.

      var win1 = Ti.UI.createWindow({
          title: 'Win 1'
      });
          
      var tab1 = Ti.UI.createTab({ 
          icon: 'KS_nav_ui.png',
          title: 'Tab 1',
          window: win1
      });
          
      var win2 = Ti.UI.createWindow({
          title: 'Win 2'
      });
          
      var tab2 = Ti.UI.createTab({ 
          icon: 'KS_nav_views.png',
          title: 'Tab 2',
          window: win2
      });
         
      var tabGroup = Ti.UI.createTabGroup({
             
      });
                  
      tabGroup.addTab(tab1);
      tabGroup.addTab(tab2);
      tabGroup.setActiveTab(tab1);
      tabGroup.open();
      tabGroup.addEventListener('focus', function(e) {
          Ti.API.info('--------------------Focus tab index: ' + e.index);
      });
       
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                amittal Anshu Mittal
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration