[TIMOB-4551] iOS: window.open with transition on 1.7.0/1.8.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-20T16:21:51.000+0000 |
Affected Version/s | Release 1.7.1 |
Fix Version/s | Sprint 2012-02, Release 2.0.0, Release 1.8.1 |
Components | iOS |
Labels | regression |
Reporter | Adriano Paladini |
Assignee | Stephen Tramer |
Created | 2011-06-01T13:20:41.000+0000 |
Updated | 2012-01-23T09:26:59.000+0000 |
Description
Open a new window with an transition, then close this opened window to return on first window. The first window will show a black screen.
This work correctly in 1.5.2 and 1.6.2
sample code for reproduce:
Ti.UI.setBackgroundColor('#000');
var win1 = Ti.UI.createWindow({
backgroundColor: 'white'
});
var btn1 = Ti.UI.createButton({
title: 'Goto 2 - without animation (no error)',
width:300,
height:100,
top:100
});
var btn2 = Ti.UI.createButton({
title: 'Goto 2 - with animation (with error)',
width:300,
height:100,
top:220
});
btn1.addEventListener('click', function(e){
var win2 = Ti.UI.createWindow({
backgroundColor: 'blue'
});
win2.open();
var btn3 = Ti.UI.createButton({
title: 'Go back',
width:300,
height:100
});
btn3.addEventListener('click', function(e){
win2.close();
});
win2.add(btn3);
});
btn2.addEventListener('click', function(e){
var win2 = Ti.UI.createWindow({
backgroundColor: 'blue'
});
win2.open({transition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_RIGHT});
var btn3 = Ti.UI.createButton({
title: 'Go back',
width:300,
height:100
});
btn3.addEventListener('click', function(e){
win2.close();
});
win2.add(btn3);
});
win1.add(btn1);
win1.add(btn2);
win1.open();
In order to progress this ticket, please provide the following information: * Titanium SDK version + build date + build hash * iOS version Note that environment information should be entered to the environment field. Thanks
Further to this, your code does not work. Please correct, and I will take another look. Thanks
Hi Paul, I tested today with last version of 1.7.1 and 1.8.0 again from http://builds.appcelerator.com.s3.amazonaws.com/index.html This error persists, and the code provide work. create a new project and paste this code on app.js.
I also noted this error on upgrading to 1.7.0.RC1 https://gist.github.com/1062247
Adriano Your code was not a proper usecase - it did not run successfully, not least because it was missing the win2 creation code. Please see Kieran's usecase, which is a very good example. Thanks
Should be postponed until after freeze. This bug requires extensive fixes to how we manage views on the root controller when animating windows in/out and could introduce regressions in the fix.
Likely a duplicate of another bug that I worked on recently; will be linked in additional triage.
Re-validated, 1.9.0.46d2d6f.
Updated reproduction sample code:
Closing bug. Verified fix on: SDK build: 1.9.0.v20120121223134 Titanium Studio, build: 1.0.8.201201210622 Xcode: 4.2 OS: Mac OS X Lion (10.7.2) Device: iPhone 4S Verizon (5.0.1)