[TIMOB-3341] iOS: navGroup closing window turns black before animation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-27T15:46:16.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | Sprint 2011-26, Release 1.8.0 |
Components | iOS |
Labels | defect, ios, reported-1.5.1, reported-1.6.0, rplist |
Reporter | Jon Alter |
Assignee | Sabil Rahim |
Created | 2011-04-15T03:42:30.000+0000 |
Updated | 2011-10-27T15:46:16.000+0000 |
Description
When you have a navGroup and open a new window using it and then close the window using the navGroup the window turns black before the navGroup goes back. If you click the back button the window does not turn black before the navGroup goes back to the previous page.
Step 1: launch the sample code below
Step 2: tap the red window to open the blue window
Step 3: click the 'close' button on the blue window to go back to
the red one
Step 4: notice that the blue window turns black before the slide
animation back to the red window
Step 5: click on the red window again
Step 6: tap the left nav button
Step 7: notice that the blue window does not turn black before
going back to the red window
app.js
var win = Titanium.UI.createWindow();
var win1 = Titanium.UI.createWindow({
backgroundColor:"red",
title:"Red Window"
});
win1.addEventListener('click', function(){
nav.open(toolsWindow);
});
var nav = Titanium.UI.iPhone.createNavigationGroup({
window: win1
});
var toolsWindow = Ti.UI.createWindow({
title: 'Blue Window',
url: 'tools_window.js',
nav: nav,
exitOnClose: false,
backgroundColor: 'blue'
});
win.add(nav);
win.open();
tools_window.js
var win = Ti.UI.currentWindow;
var button = Ti.UI.createButton({
title: 'close',
height: 40,
width: 300,
});
button.addEventListener('click', function(e) {
Ti.API.info('clicked close');
win.nav.close(win);
});
win.add(button);
Tested on
TiSDK 1.5.1, 1.6.0, iOS SDK 4.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/76439">http://developer.appcelerator.com/helpdesk/view/76439
Similar thing happens in a tabgroup. Replace the app.js code from above with this one:
When closing the next window with the custom button, the window does animate to the side and closes, but the navBar elements stay in their place instead of sliding over with the window the way they would by pressing the built in back button. This bug seems related, that's why I'm not opening a separate ticket for it. Helpdesk ticket: http://support.appcelerator.com/tickets/APP-218955/homepage
https://github.com/appcelerator/titanium_mobile/pull/169 the pull request associated with it
Its been merged and was cherry picked into 1.7.x
Tested On: Mac OSX Lion TiMob: 1.8.0v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone4 version 4.2.10 iPad2 version 4.3.5 iPod 3