[TIMOB-8677] iOS: Window Open event in navgroup fired unexpectedly
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | Medium | 
| Status | Closed | 
| Resolution | Cannot Reproduce | 
| Resolution Date | 2012-04-26T11:02:15.000+0000 | 
| Affected Version/s | Release 2.0.0 | 
| Fix Version/s | n/a | 
| Components | iOS | 
| Labels | api, navgroup | 
| Reporter | Frank Apap | 
| Assignee | Vishal Duggal | 
| Created | 2012-04-11T08:37:10.000+0000 | 
| Updated | 2017-03-20T22:16:37.000+0000 | 
Description
	If you have a navgroup that has window A open, then open window B and finally close window B - window A's OPEN event is fired on the close of Window B.  This doesn't happen when the windows are not part of a navgroup.
In this example code win1's open event fires when clicking label2 (to close win2).
~~~
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
navWindow = Ti.UI.createWindow();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1 - Click to open win 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});
win1.add(label1);
win1.addEventListener('open',function(e){
	Ti.API.info("OPENEVENT");
});
navGroup = Ti.UI.iPhone.createNavigationGroup({
    window:  win1
});
navWindow.add(navGroup);
navWindow.open();
//
// create controls tab and root window
//
label1.addEventListener('click', function(e){
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});
label2.addEventListener('click',function(e){
	navGroup.close(win2);
});
win2.add(label2);
navGroup.open(win2);
});
~~~
I think the correct behavior here should be the window focus event.
Kevin, that makes total sense to me.
Can not reproduce on latest master
I took the latest 2.0.2 build and it's still happening.
@Frank - can you please try it out with the master (2.1.0) build as we cannot reproduce this issue with the latest master build?
Closing ticket as duplicate.