{ "id": "140981", "key": "TIMOB-18140", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-12-08T18:47:20.000+0000", "created": "2014-12-04T21:49:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "alertDialog", "background", "ios", "qe-3.5.0", "regression" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T18:09:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "An app shows an old screen state when foregrounding after the device's orientation is changed while in the background.\r\n\r\nPlease see attached gif.\r\n\r\n*Steps to reproduce issue*:\r\n1. Launch the sample code\r\n2. With device in portrait mode, click on the 'Short Title' button \r\n3. Without dismissing the alert, click on the home button to send the app in background. \r\n4. Change the orientation of device to landscape and launch the app again \r\n5. Dismiss the alert\r\n6. Click on the home button to send the app in background.\r\n7. Change the orientation of device to portrait and launch the app again\r\n8. Notice that the first alert is shown for a second\r\n\r\n*Expected Results*:\r\nThe first alert is not shown after returning to the app in step 7.\r\n\r\n*Notes*:\r\nThis does not occur in SDK 3.4.1.GA.\r\n\r\n{code}\r\n _window = Ti.UI.createWindow({\r\n backgroundColor : '#fff'\r\n });\r\n\r\nvar 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.\";\r\n\r\n var Button1 = Ti.UI.createButton({\r\n title: \"Short Title\",\r\n top: 30\r\n });\r\n\r\n Button1.addEventListener('click', function(e) {\r\n shortAlertDialog.show();\r\n });\r\n\r\n var Button2 = Ti.UI.createButton({\r\n title: \"Long Title\",\r\n top: 80\r\n });\r\n\r\n Button2.addEventListener('click', function(e) {\r\n longAlertDialog.show();\r\n });\r\n\r\n var shortAlertDialog = Ti.UI.createAlertDialog({\r\n message: 'The file has been deleted',\r\n ok: 'Okay',\r\n title: 'Short Dialog',\r\n persistent: true\r\n });\r\n\r\n var longAlertDialog = Ti.UI.createAlertDialog({\r\n message: longmsg,\r\n ok: \"Okay\",\r\n title: \"Long Dialog\",\r\n persistent: true\r\n\r\n });\r\n\r\n _window.add(Button1);\r\n _window.add(Button2);\r\n\r\n _window.open();\r\n{code}", "attachment": [ { "id": "53027", "filename": "Orientation change error.gif", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-04T21:49:21.000+0000", "size": 3428272, "mimeType": "image/gif" } ], "flagged": false, "summary": "iOS: AlertDialog: Screen shows old orientation when foregrounding after orientation change in background", "creator": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.5.0.v20141201143204 \r\nStudio 3.4.1.201410281743 \r\nXcode 6.1.1\r\n\r\nOn: \r\niPad mini, iOS 8.1\r\niPhone 6, iOS 8.2b \r\niPhone 4S Sim, iOS 8.1", "closedSprints": [ { "id": 272, "state": "closed", "name": "2014 Sprint 25 SDK", "startDate": "2014-12-08T22:49:31.264Z", "endDate": "2014-12-22T01:00:00.000Z", "completeDate": "2015-01-05T18:18:28.523Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "335405", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This happens because Apple takes a screenshot of your app when it goes into the background and displays that screenshot while the app is resuming. Naturally, the app has a different screenshot for portrait than the one it uses for landscape.\r\n\r\nThe alert dialog being seen is actually the screenshot of the app state when you backgrounded the app in that orientation. This behavior can be observed in a native app by following the same repro steps above but changing the background color instead of using an alert.\r\n\r\nh6. Workaround\r\n\r\nThis issue can easily be avoided by using the `forceSplashAsSnapshot` property. Setting this property to `true` will display the app's splash screen on resume.\r\n\r\nAdd the following line to the example above.\r\n{code}\r\nTi.App.forceSplashAsSnapshot = true;\r\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-08T18:37:47.000+0000", "updated": "2014-12-08T18:37:47.000+0000" }, { "id": "414843", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix and with reference to the above comments. ", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T18:09:51.000+0000", "updated": "2017-03-22T18:09:51.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }