Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15197] iOS7: AlertDialog changes its position on orientation change

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-08-18T09:15:11.000+0000
Affected Version/sRelease 3.1.3
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsiOS
Labelsios7, module_alertdialog, qe-manualtest
ReporterBetty Tran
AssigneeVishal Duggal
Created2013-09-16T15:43:12.000+0000
Updated2014-08-18T09:15:11.000+0000

Description

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();

Attachments

FileDateSize
foto 1.PNG2013-09-16T15:43:12.000+0000164741
foto 2.PNG2013-09-16T15:43:12.000+0000123354
foto 3.PNG2013-09-16T15:43:12.000+0000161404

Comments

  1. Vishal Duggal 2013-10-24

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4845
  2. Pragya Rastogi 2013-10-31

    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

JSON Source