Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19166] iOS: Left nav button is invisible (on the second tab) when the right nav button is replaced

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 4.1.1
Fix Version/sn/a
ComponentsiOS
Labels3.4.0, 3.4.1, TCSupportTriage, ios8, leftnavbutton, navbutton, replaced, reprod, tabgroup
ReporterMarkus Eschenbach
AssigneeUnknown
Created2014-11-10T16:53:56.000+0000
Updated2018-02-28T19:55:12.000+0000

Description

Problem description

The left nav button on the second tab (Tab 2) is invisible when the right nav button on the first tab (Tab 1) is replaced with an other button.

Steps to reproduce

1. Switch to the second tab (Tab 2) to assure that the left nav button is visible 2. Switch back to the first tab (Tab 1) 3. Tap on the right nav button (Click here) 4. Switch to the second tab (Tab 2) again! The left nav button is invisble 5. It is possible to tap on the left nav button area (in the second tab) to fire the onClick event of the button

Test case

(function() {
	var tabGroup = Titanium.UI.createTabGroup();
	
	var win1 = Titanium.UI.createWindow({title: 'Tab 1',backgroundColor: '#fff'});
	var tab1 = Titanium.UI.createTab({title: 'Tab 1',window: win1});	
	var win2 = Titanium.UI.createWindow({title: 'Tab 2',backgroundColor: '#fff'});
	var tab2 = Titanium.UI.createTab({title: 'Tab 2',window: win2});

	var descriptionLabel = Titanium.UI.createLabel({left:20,top:20,width:Titanium.UI.FILL,font:{fontSize:12},
		   text:'PROBLEM DESCRIPTION\n'
		   +'The left nav button on the second tab (Tab 2) is invisible when the right nav button on the first tab (Tab 1) is replaced with an other button  \n\n'
		   +'STEPT TO REPRODUCE\n'
		   +'1. Switch to the second tab (Tab 2) to assure that the left nav button is visible \n'
		   +'2. Switch back to the first tab (Tab 1)\n'
		   +'3. Tap on the right nav button (Click here)\n'
		   +'4. Switch to the second tab (Tab 2) again! The left nav button is invisble\n'
		   +'5. It is possible to tap on the left nav button area (in the second tab) to fire the onClick event of the button\n\n'
		   +'ENVIRONMENT\n'
		   +'Ti Mobile SDK: 3.4.0 GA, Ti Studio: 3.4.0.201409261227, iOS: 8.1 & 8.1.1, Device: iPhone 5 and 5S'
	});
	
	win1.add(descriptionLabel);

	var leftBtn = Titanium.UI.createButton({title: 'Left'});
	var rightClickBtn = Titanium.UI.createButton({title: 'Click here'});
	var rightClickedBtn = Titanium.UI.createButton({title: 'Clicked'});
	
	leftBtn.addEventListener('click',function(){
		alert('left button clicked');
	});
	
	rightClickBtn.addEventListener('click',function(){
		win1.rightNavButton = rightClickedBtn; //toggle btn
	});
	
	win1.leftNavButton = leftBtn;
	win2.leftNavButton = leftBtn;
	
	win1.rightNavButton = rightClickBtn;
	
	tabGroup.addTab(tab1);
	tabGroup.addTab(tab2);
	
	tabGroup.open();
})();	

Comments

  1. Lee Morris 2017-07-06

    I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source