Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1553] iOS: Navigating back in a navigationGroup makes the leftNavButton fade-in twice

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-06-25T13:30:46.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0
ComponentsiOS
Labelsmodule_navgroup, qe-testadded
ReporterSindre Sorhus
AssigneeNeeraj Gupta
Created2011-04-15T02:55:51.000+0000
Updated2012-07-11T13:59:13.000+0000

Description

Sample code from pastebin: http://pastebin.com/QeeGwMtF
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Ti.UI.setBackgroundColor('#000');


// refresh button
var refreshButton = Ti.UI.createButton({
	systemButton: Titanium.UI.iPhone.SystemButton.REFRESH
});

// add button
var addButton = Ti.UI.createButton({
	systemButton: Titanium.UI.iPhone.SystemButton.ADD
});



// create navgroup
var win = Ti.UI.createWindow();

var win1 = Ti.UI.createWindow({
	title: 'test',
    leftNavButton: refreshButton,
    rightNavButton: addButton
});

var nav = Ti.UI.iPhone.createNavigationGroup({
   window: win1
});

win.add(nav);

win.open();


addButton.addEventListener('click', function() {
	var addWindow = Ti.UI.createWindow();
	nav.open(addWindow, {
		animated: true
	});
});
Click the + button, then click Back, and see the leftNavButton fade-in twice.

Comments

  1. Pedro Enrique 2011-04-15

    There is a Helpdesk ticket reporting this problem: http://developer.appcelerator.com/helpdesk/view/75911">http://developer.appcelerator.com/helpdesk/view/75911

    Here is a simple runnable example:

         var win = Titanium.UI.createWindow();
           var win1 = Titanium.UI.createWindow({
               backgroundColor:"red",
               title:"Red Window"
           });
       
           var navBtn = Ti.UI.createButton({title:'button'});
           win1.leftNavButton = navBtn;
       
           var nextBtn = Ti.UI.createButton({
               title:'go to next window',
               width:200,
               height:50
           });
           win1.add(nextBtn);
       
           var nav = Titanium.UI.iPhone.createNavigationGroup({
              window: win1
           });
           win.add(nav);
           win.open();
       
           nextBtn.addEventListener('click', function(){
               var win2 = Titanium.UI.createWindow({
                   backgroundColor:"blue",
                   title:"Blue Window"
               });
               nav.open(win2,{animated:true});
           });
       

    Tested on 1.6 Resease
    iPad and iPhone simulator 4.2

  2. Reggie Seagraves 2011-04-15

    Moving navigation issues to Sprint 16.

  3. Wilson Luu 2011-10-31

    Bug is still valid, occurs in: TiMOB sdk version: 1.8.0.v20111028154620 Studio version: 1.0.6.201110251616 OS version: Mac OS X Lion Devices tested on: ipad 4.3.5, iphone simulator 4.3 Note: Verified this bug does not appear in TiMOB sdk 1.7.4
  4. Sindre Sorhus 2012-01-02

    Any updates?
  5. Neeraj Gupta 2012-06-25

    This issue has been fixed as a part of some other fix. It is very possible that this fix is available in releases prior to 2.1.0 release.
  6. Olga Romero 2012-06-29

    Verified fix with: Titanium Studio, build: 2.1.0.201206251749 Titanium SDK: 2.1.0.v20120628121617 Devices: 3GS 4.3, 4S 5.0.1

JSON Source