Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9525] iOS: Ti.UI.iOS.TabbedBar - no 'click' events get triggered on already selected button

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-01-29T22:30:49.000+0000
Affected Version/sRelease 2.1.0, Release 1.8.2, Release 2.0.1, Release 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, supportTeam
ReporterFederico Casali
AssigneeEric Merriman
Created2012-06-13T16:15:39.000+0000
Updated2017-03-30T20:43:06.000+0000

Description

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();

Comments

  1. Vishal Duggal 2012-06-14

    If you want to register every click use the buttonBar. The tabbedBar only fires the click event when the selected index changes.
  2. Shameer Jan 2013-03-28

    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
  3. Hans Knöchel 2017-01-29

    This is the intended native iOS behavior. If this behavior is required anyway, a custom UI element should be used to achieve that.
  4. Lee Morris 2017-03-30

    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.

JSON Source