Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17648] iOS8: iPad Alert dialog does not consider window orientation modes

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-09-15T16:28:41.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.0, Release 3.5.0
ComponentsiOS
Labelsios8, module_orientation, qe-testadded, regression
ReporterOlga Romero
AssigneeVishal Duggal
Created2014-09-08T20:53:49.000+0000
Updated2014-11-21T20:27:35.000+0000

Description

Description

We have modal window and a button. when user clicks on the button alert pops up. The app is supposed to have only portrait orientation which is set in tiApp.xml file. When alert pops up, the device supports orientation change.

Testcase

Step to reproduce: 1.Tap on the button in the main window,which opens modal window. 2.Tap on the button in modal window that brings up alert dialog. 3.Try rotating the device and orientation is supported

//app.js
var win = Ti.UI.createWindow({
backgroundColor : '#fff',
    
orientationModes : [Ti.UI.PORTRAIT] //to be sure
});
 
 
var clickMeBtn = Ti.UI.createButton({
 
title : 'Click to open modal window'
});

var cancelBtn = Ti.UI.createButton({
 
title : 'cancel'
});

var modalWin = Ti.UI.createWindow({
backgroundColor : '#bbb',
    
modal : true,
    
orientationModes : [Ti.UI.PORTRAIT] //to be extra double sure
});

var modalButton = Ti.UI.createButton({
title : 'Click to test Orientation'
});
modalWin.add(modalButton); 
modalWin.setLeftNavButton(cancelBtn);
 
win.add(clickMeBtn);
  
 
clickMeBtn.addEventListener('click',function(_event){
 
 modalWin.open();
 
});

modalButton.addEventListener('click', function(e) {
   var dialog = Ti.UI.createAlertDialog({
    message: 'Rotate device to see the orientaion change',
    ok: 'Okay',
    title: 'File Deleted'
  }).show(); 
//alert('Rotate device to see the orientaion change');
});

cancelBtn.addEventListener('click', function(e){
	modalWin.close();
});
 
win.open();
In tiapp.xml
<iphone>
        <orientations device="iphone">
            <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>
        <orientations device="ipad">
            <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>
</iphone>

Comments

  1. Ingo Muschenetz 2014-09-08

    FYI.
  2. Vishal Duggal 2014-09-12

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/6065 Backport to 3_4_X https://github.com/appcelerator/titanium_mobile/pull/6066
  3. Olga Romero 2014-09-12

    Tested with Mac osx 10.9.4 Maverics Appcelerator Studio, build: 3.4.0.201409112242 Titanium SDK, build: 3.4.0.v20140912145715 acs@1.0.16 alloy 1.5.0-rc install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0-rc2 titanium-code-processor@1.1.1 Xcode6 Device: iPad Air iOS8 Works as expected, the alert dialog is always in a portrait mode
  4. Amimul Hossain 2014-09-16

    Hello, We have tested this with Mac osx 10.9.4 Maverics Appcelerator Studio, build: 3.4.0.201409112242 Titanium SDK, build: 3.4.0.v20140912145715 alloy 1.5.0-rc titanium 3.4.0-rc2 Xcode6beta7 Device: iPod iOS8 Simulator: iPhone5s Version 8.0 (550), Simulator rotation was applied. Works as expected, the alert dialog remains in portrait mode.

JSON Source