Project: titanium
Issue TIMOB-18140: iOS: AlertDialog: Screen shows old orientation when foregrounding after orientation change in background
An app shows an old screen state when foregrounding after the device's orientation is changed while in the background. Please see attached gif. *Steps to reproduce issue*: 1. Launch the sample code 2. With device in portrait mode, click on the 'Short Title' button 3. Without dismissing the alert, click on the home button to send the app in background. 4. Change the orientation of device to landscape and launch the app again 5. Dismiss the alert 6. Click on the home button to send the app in background. 7. Change the orientation of device to portrait and launch the app again 8. Notice that the first alert is shown for a second *Expected Results*: The first alert is not shown after returning to the app in step 7. *Notes*: This does not occur in SDK 3.4.1.GA. {code} _window = Ti.UI.createWindow({ backgroundColor : '#fff' }); 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 }); _window.add(Button1); _window.add(Button2); _window.open(); {code}
Story points: 8