Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8725] iOS: New window is displayed in portrait while testing in landscape mode

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-30T15:50:23.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-09 API
ComponentsiOS
Labelsapi, qe-ios040912
ReporterTamila Smolich
AssigneeSabil Rahim
Created2012-04-13T15:06:29.000+0000
Updated2012-06-14T10:02:27.000+0000

Description

Description: While running test case in landscape mode, new blue window comes in incorrect (portrait) mode. This bug occurs on 2.0.0 and 1.8.2. Steps: 1. Run the following code on iPad in landscape mode:
function modalWindow(){
    var b = Ti.UI.createButton({title:'close'});
    var a = Ti.UI.createButton({title:'open win'});
     
    var w = Ti.UI.createWindow({
        backgroundColor:'red',
        rightNavButton:b,
        leftNavButton:a
    });
 
    w.add(Ti.UI.createLabel({text:'This is a normal window', top:20, textAlign:'center', height:40, backgroundColor:'white'}));
 
    b.addEventListener('click', function(){
        w.close();
    });
    a.addEventListener('click', function(){
        normalWindow().open();
    });
    return w;
}
function normalWindow(){
    var b = Ti.UI.createButton({title:'close',width:200,height:40, top:100});
     
    var w = Ti.UI.createWindow({
        backgroundColor:'blue'
    });
    w.add(Ti.UI.createLabel({text:'This is a normal window', top:20, textAlign:'center', height:40, backgroundColor:'white'}));
    w.add(b);
    b.addEventListener('click', function(){
        w.close();
    });
    return w;
}
(function(){
    var win = Ti.UI.createWindow({
        backgroundColor:'green'
    });
 
    var btn = Ti.UI.createButton({
        width:100,
        height:40,
        title:'open modal'
    });
 
    win.add(btn);
 
    btn.addEventListener('click', function(){
        modalWindow().open({modal:true});
    });
 
    win.open();
})();
2. Press the "Open modal" button 3. Press the "Open win" button in the Navbar Expected result: Should see new blue window in correct mode Actual result: The new blue window comes in incorrect (portrait) mode

Attachments

FileDateSize
Screenshot 2012.04.13 14.52.22.png2012-04-13T15:06:29.000+000028295

Comments

  1. Vishal Duggal 2012-04-30

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2087
  2. Tamila Smolich 2012-06-14

    Closing bug as fixed. Tested and verified on: Titanium Studio, build: 2.1.0.201206131907 Titanium SDK: 2.1.0.v20120613210250

JSON Source