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

Android: TabGroup focus event args refer to previous tab, not current tab

    Details

      Description

      {html}<div><p>Also, tabGroup.activeTab.title returns undefined.</p>
      <p>Test case:</p>
      <pre>
      <code class="javascript">
      Titanium.UI.setBackgroundColor('#000');
      var tabGroup = Titanium.UI.createTabGroup();

      for (var i = 0; i < 4; i++) {
      var win = Ti.UI.createWindow({ title: 'Tab ' + i, backgroundColor: '#fff' });
      var tab = Ti.UI.createTab({ title: 'Tab ' + i, window: win });
      tabGroup.addTab(tab);
      }

      tabGroup.addEventListener('focus', function(e) {
      Ti.API.info('index: ' + e.index);
      Ti.API.info('previousIndex: ' + e.previousIndex);
      Ti.API.info('previousTab.title: ' + e.previousTab.title);
      Ti.API.info('tab.title: ' + e.tab.title);
      Ti.API.info('tabGroup.activeTab.title: ' + tabGroup.activeTab.title);
      });

      tabGroup.open();</code>
      </pre>
      <p>After the app launches, click Tab 1 and you'll see the info
      output in the console refers to Tab 0.</p></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              dthorp Don Thorp
              Reporter:
              billdawson Bill Dawson
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration