Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7627] iOS: UI - Email/SMS Dialog does not change orientation properly

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-04-27T14:04:07.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.0.0
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsiOS
Labelsmodule_orientation, qe-testadded, regression
ReporterEduardo Gomez
AssigneeSabil Rahim
Created2012-02-13T07:20:59.000+0000
Updated2013-12-25T03:31:35.000+0000

Description

Issue

When you create a window and set win.orientationModes = [Titanium.UI.PORTRAIT]; or set it in Tiapp.xml. Then create an emailDialog or SMSDialog and open that window. If you proceed to rotate the device into LANDSCAPE the window itself rotates into LANDSCAPE but the statusbar and keyboard remain in PORTRAIT.

Expected behavior

The keyboard and statusBar rotate accordingly. Used to work in 1.7.x - as seen in the screenshots.

Tested on

iPhone 4 iOS simulator 5 TiSDK 1.7 > OK TiSDK 1.8 > Fail TiSDK 1.9 > Fail

Steps to reproduce

1) Run code below 2) Click "Email" button 3) Select a field from Email dialog - the keyboard shows up. 4) Rotate device 5) Misbehavior appears suddenly.

Repro sequence

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
 
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
 
 
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});
 
var label1 = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 1',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});
 
var button = Ti.UI.createButton({
    title:'Email',
    height:40
});
button.addEventListener('click', function(){
    var emailDialog = Ti.UI.createEmailDialog();
    emailDialog.open();
});
 
win1.add(label1);
win1.add(button);
//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});
 
var label2 = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 2',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});
 
win2.add(label2);
 
 
 
//
//  add tabs
//
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
 
 
// open tab group
tabGroup.open();

Additional info

If the window is locked doesn't seems to work either. Locked the orientation on iOS:
    <iphone>
        <orientations device="iphone">
            <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>
        <orientations device="ipad">
            <orientation>Ti.UI.PORTRAIT</orientation>
            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
        </orientations>
    </iphone>

Attachments

FileDateSize
Titanium SDK version- 1.7.5.jpg2012-02-13T07:20:59.000+000048948
Titanium SDK version- 1.8.1.jpg2012-02-13T07:20:59.000+000041487
Titanium SDK version- 1.9.0.jpg2012-02-13T07:20:59.000+000042207

Comments

  1. Wilson Luu 2012-03-15

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120315170247 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1)
  2. Natalie Huynh 2012-04-27

    open to update label

JSON Source