[TIMOB-8070] iOS: Modal windows are clipped / incorrectly oriented
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-04T10:37:15.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | iOS |
Labels | ios, module_window, qe-testadded |
Reporter | Sabil Rahim |
Assignee | Max Stepanov |
Created | 2012-03-16T16:59:49.000+0000 |
Updated | 2012-04-04T10:37:15.000+0000 |
Description
In the following code the windows opened are never cleared out from memory which can cause memory as well as orientation issues as we check the last window on the stack to find the current orientation.
Steps to reproduce
1. Click open on Blue window 2. Click close on Green Window.Expected Result:
Blue window is orientated and filling the screen.Actual Result:
Blue window is clipped.
var toplevel = Ti.UI.createWindow({
orientationModes:[
Ti.UI.PORTRAIT,
Ti.UI.UPSIDE_PORTRAIT
],
backgroundColor:'blue'
});
var win = Ti.UI.createWindow({
orientationModes:[
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
],
backgroundColor:'green'
});
var b = Ti.UI.createButton({
title:'open',
width:100,
height:50
});
b.addEventListener('click', function() {
win.open({modal:true});
});
var b2 = Ti.UI.createButton({
title:'open',
width:100,
height:50,
top:20
});
b2.addEventListener('click', function() {
var win2 = Ti.UI.createWindow({
orientationModes:[Ti.UI.LANDSCAPE_RIGHT],
backgroundColor:'red'
});
var b4 = Ti.UI.createButton({
title:'close',
width:100,
height:50,
bottom:20
});
win2.add(b4);
b4.addEventListener('click', function() {
win2.close();
});
win2.open();
});
var b3 = Ti.UI.createButton({
title:'close',
width:100,
height:50,
bottom:20
});
b3.addEventListener('click', function() {
win.close();
});
var b4 = Ti.UI.createButton({
title:'close',
width:100,
height:50,
bottom:20
});
b4.addEventListener('click', function() {
win2.close();
});
toplevel.add(b);
win.add(b2);
win.add(b3);
toplevel.open();
Pull #1691 merged
Closing issue Tested with Ti Studio build 2.0.0.201203202130 Ti Mob SDK 2.0.0.v20120321071752 hash r4c936bac OSX Lion 10.7.3 iPone 4S OS 5.1 Expected result is shown
Reopening/closing to add/remove labels