[TIMOB-925] can't close window in nav group
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:39:20.000+0000 |
Updated | 2011-04-17T01:54:41.000+0000 |
Description
see http://helpdesk.appcelerator.net/tickets/2392">http://helpdesk.appcelerator.net/tickets/2392
code to reproduce:
var inner1 = Ti.UI.createWindow({ title:'Window1' });
var inner2 = Ti.UI.createWindow({ title:'Window2' });
var nav = Ti.UI.iPhone.createNavigationGroup({ window: inner1 });
var win = Ti.UI.createWindow();
win.add(nav);
win.open();
setTimeout(function(){
Ti.API.info('opening');
nav.open(inner2);
}, 1000);
setTimeout(function(){
Ti.API.info('closing');
inner2.close();
}, 2000);
Part of the issue is that nav.open() calls must use a corresponding nav.close(), NOT window.close() (due to both navigation stack management and internal gunk that makes nav controllers not play nice with the windowing system).
There are still problems with nav.close(). Keeping this open to signify them.
(from [c7b713fdc61dd903e3dbef420f76eb1663f07bb1]) Closes #925: Ti.UI.iPhone.NavigationGroup.close() now manages the view stack. http://github.com/appcelerator/titanium_mobile/commit/c7b713fdc61dd903e3dbef420f76eb1663f07bb1"> http://github.com/appcelerator/titanium_mobile/commit/c7b713fdc61dd...
This does not seem to work. Using both the 1.4.x nightly and the 1.5.0 nightly the navigation group will return to the upper level on navGroup.close(subWindow) but a 2nd time through navigation and calling close ends up stuck in a black screen with no way out.
We need sample code to reproduce this issue.