Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5766] iOS: tabbedBar doesn't consistently fire click events

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T16:41:14.000+0000
Affected Version/sRelease 1.7.2, Release 1.8.0
Fix Version/sSprint 2011-46, Release 1.8.0.1
ComponentsiOS
Labelsmodule_tabbedbar, qe-testadded
ReporterKarol Pomaski
AssigneeSabil Rahim
Created2011-10-17T07:07:09.000+0000
Updated2012-01-05T16:41:14.000+0000

Description

Problem

TabbedBar does not consistently fire click event.

Reproducible Steps

1. Execute the sample code 2. Click on the TabbedBar buttons 4-5 times (after the 2nd time the event won't be fired anymore)

Sample Code

var win = {};

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

var rootWin = Titanium.UI.createWindow({
  
});


win.main = Titanium.UI.createWindow({  
});
win.rootNav = Titanium.UI.iPhone.createNavigationGroup({
   window: win.main
});
rootWin.add(win.rootNav);
rootWin.open();

function showWin(){
  var newWin = Titanium.UI.createWindow({
  });  

  var tb2 = Titanium.UI.createTabbedBar({
    labels:[
      {title: 'A', width: 100, enabled:true},
      {title: 'B', width: 100, enabled:true},
      {title: 'C', width: 100, enabled:true}  
    ],
  });
  tb2.addEventListener('click', function(e){
    alert('I work!');

  });
  
  newWin.setToolbar([tb2]);    

  win.rootNav.open(newWin);

}

showWin();

Associated HelpDesk Ticket

http://appc.me/c/APP-318632

Comments

  1. Sabil Rahim 2011-11-23

    pull pending #764
  2. Michael Pettiford 2011-12-08

    Tested on Ti Studio 1.0.7.201112080131 
Ti Mob SDK 1.8.0.1.v20111207180431 
OSX Lion iPhone 4S OS 5.0.1 Expected behavior of segment control firing click events is shown
  3. Eric Merriman 2012-01-05

    Reopened to edit labels

JSON Source