Problem description
Ti.UI.iOS.TabbedBar does not fire a click event if the user taps on a button that's already selected.
Steps to reproduce and sample code
1. Run sample code and click on a tabbedBar button
Result: 'click' eventListener it's correctly triggered. Button it's now selected.
2. Click again on the same button
Result: no 'click' event it's triggered
var win = Titanium.UI.createWindow({
title:'test',
backgroundColor:'white'
});
var tb1 = Titanium.UI.iOS.createTabbedBar({
labels:['One', 'Two', 'Three'],
backgroundColor:'#336699',
top:50,
style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
height:25,
width:200,
index:2
});
win.add(tb1);
var odd=true;
tb1.addEventListener('click', function(e){
alert('clicked!');
});
win.open();
If you want to register every click use the buttonBar. The tabbedBar only fires the click event when the selected index changes.
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
This is the intended native iOS behavior. If this behavior is required anyway, a custom UI element should be used to achieve that.
Closing ticket as "Won't Fix". There has been no update for a number of years. If there is any problem, please open a new ticket.