Description
When we open an alert dialog and background the app in portrait mode, if we resume the app in landscape the alert dialog shifts position.
Steps to reproduce
1. Pop up Alert message by Clicking Long title Button in Portrait mode
2. Press the home button once
3. Resume the app in Landscape mode (See screenshot 2 for how it looks at this step)
4. Pop up Alert message by Clicking Long title Button in Landscape mode
5. Press the home button
6. Resume the app in portrait mode (See screenshot 3 for how it looks at this step)
Code
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var longmsg = "Appcelerator is the only mobile first platform that enables enterprise to create, deliver and analyze their mobile applications. Appcelerator offers the only platform built for a Mobile First world. It is the mobile platform of choice for thousands of companies including eBay, Merck, Mitsubishi Electric, NBC, PayPal and Ray-Ban, as they become Mobile First enterprises. With 59,895 mobile applications deployed on 162,143,002 devices, the Appcelerator Platform helps enterprises accelerate their time to market, reduce costs, manage risk, and deliver exceptional mobile user experiences.";
var Button1 = Ti.UI.createButton({
title : "Short Title",
top : 30
});
Button1.addEventListener('click', function(e){
shortAlertDialog.show();
});
var Button2 = Ti.UI.createButton({
title : "Long Title",
top : 80
});
Button2.addEventListener('click', function(e){
longAlertDialog.show();
});
var shortAlertDialog = Ti.UI.createAlertDialog({
message: 'The file has been deleted',
ok: 'Okay',
title: 'Short Dialog',
persistent : true
});
var longAlertDialog = Ti.UI.createAlertDialog({
message : longmsg,
ok:"Okay",
title : "Long Dialog",
persistent : true
});
win.add(Button1);
win.add(Button2);
win.open();
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4845
Verified the fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201310310241 SDK: 3.2.0.v20131030184044 acs:1.0.7 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iOS7(v7.0.3)-iPodTouch1