[TIMOB-11032] iOS : Modal windows are not respecting orientation mode settings.(iOS 6 only)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-09-20T17:30:03.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
Components | n/a |
Labels | api, ios6, qe-testadded |
Reporter | Lokesh Choudhary |
Assignee | Ingo Muschenetz |
Created | 2012-09-20T16:40:14.000+0000 |
Updated | 2013-01-15T03:50:57.000+0000 |
Description
This issue is not seen on iOS 5.1.
Steps to reproduce:
1.Replace the code in your app.js with the code below.
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();
2.Run it on a device/simulator.
3.You will get a white window.
4.Tap on open .
5.You will get a window with blue background(in portrait orientation).
6.Tap on open button on blue window.
7.You will get a green window in portrait orientation.But according to the declared orientation in the code it should open in landscape_left or landscape_right mode.
Actual results:
1.The green modal window totally ignores the orientation declared in the code & opens in portrait mode instead of landscape..
Expected results:
1.The green window should open in landscape mode.
This seems like it might be related to an existing issue.
Duplicate of TIMOB-10972. PR for TIMOB-10973 should fix this.
Tested with: SDK: 3.0.0 GA Studio:3.0.1.201212181159 Device: iPad3(v 6.0) Green window displayed in landscape right orientation.