Issue
When the alert dialog is called with an input text style and a orientation mode restricted to Portrait and the device is rotated to landscape the alertDialog keeps rotating but only if the keyboard is being displayed, if the keyboard is hiding the alert will not rotate.
Step to reproduce
1. Run the test code
2. Tap on the "Welcome to Titanium" for the alert to be displayed
3. Try to rotate the device.
4. Go back to portrait and tap on the input text box.
5. Try to rotate the device
Expected Results
The alert will not rotate and remain in portrait mode.
Actual results
When the keyboard is hidden the alert will not rotate, once the keyboard is displayed the alert will begin to rotate
Test Code
var win = Ti.UI.createWindow({
orientationModes: [Ti.UI.PORTRAIT],
backgroundColor:'#ffffff'
});
var label = Ti.UI.createLabel({
color:'#000000',
text:String.format(L('welcome'),'Titanium'),
height:'auto',
width:'auto'
});
label.addEventListener('click', function(e) {
var alertDialog = Ti.UI.createAlertDialog({
title: "Alert Dialog",
message: "akjskajksa skajskajksjas akjskajskjaks aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa",
style: Ti.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT
});
alertDialog.show();
});
win.add(label);
win.open();
Can reproduce on: Mac OSX 10.9.4 Appcelerator Studio, build:3.4.0.201409161950 Titanium SDK build: 3.4.0.v20140917120000 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc2 Xcode6.0.1 iOS Device iPad4 (8.0), iPhone 4s (8.0) When a keyboard is on screen the alert dialog rotates on both devices but the keyboard stays in place, on a large device this is not an issue but on a smaller device the alert dialog is hidden because of this. See attached screenshots. *Please note*, this is using forced orientation.
Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6188 3_4_X - https://github.com/appcelerator/titanium_mobile/pull/6189
Tested and verified the fix, using Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141001133315 acs@1.0.18 alloy 1.5.1-rc install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM The alert dialog remains in a portrait mode.