{ "id": "89782", "key": "TIMOB-8668", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13405", "description": "Sprint 2012-09 API", "name": "Sprint 2012-09 API", "archived": true, "released": true, "releaseDate": "2012-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-01T15:49:24.000+0000", "created": "2012-04-10T13:19:24.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_optiondialog", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-12T13:34:08.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": "h2. Problem\r\n\r\nI think I found a bug in the OptionDialog. If one rotates an app to landscape, then opens a ModalWindow and there an OptionDialog. The OptionDialog is displayed centered and in portrait mode instead of landscape.\r\n\r\nh2. Test case\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar win1 = Ti.UI.createWindow({orientationModes:[Titanium.UI.PORTRAIT, \r\n\t\tTitanium.UI.UPSIDE_PORTRAIT, \r\n\t\tTitanium.UI.LANDSCAPE_LEFT, \r\n\t\tTitanium.UI.LANDSCAPE_RIGHT,]});\r\nwin1.open();\r\n \r\nsetTimeout(function() {\r\n \r\n var win = Ti.UI.createWindow({title: 'MyApp'});\r\n var button = Ti.UI.createButton({title: 'open'});\r\n \r\n win.open({modal: true});\r\n win.add(button);\r\n \r\n button.addEventListener('click', function () {\r\n \r\n var dialog = Ti.UI.createOptionDialog({title: 'test', options: ['1', '2', '3']});\r\n dialog.show();\r\n });\r\n \r\n}, 5000);\r\n{code}\r\n\r\nI just set a timeout cause you need a few seconds to rotate the device. All orientations are allowed in {{tiapp.xml}}\r\n\r\nh3. Steps to reproduce:\r\n\r\n* Open app and rotate the iPhone or Simulator to landscape (cmd + left/right) while the window is black.\r\n* After 5 seconds it'll open a Modal Window with white background and a button.\r\n* Open the OptionDialog by pressing the 'open' Button.\r\n\r\nh3. Result:\r\n\r\nThe option dialog is centered and not correct displayed. See attached image.\r\n\r\nh2. Community Discussion\r\n\r\nQ&A [iPhone: OptionDialog has wrong rotation if displayed within a Modal Window and landscape orientation|http://developer.appcelerator.com/question/134792/iphone-optiondialog-has-wrong-rotation-if-displayed-within-a-modal-window-and-landscape-orientation]", "attachment": [ { "id": "26964", "filename": "screenshot215d.png", "author": { "name": "mkrug", "key": "mkrug", "displayName": "Markus Krug", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-10T13:19:24.000+0000", "size": 13533, "mimeType": "image/png" } ], "flagged": false, "summary": "iPhone: OptionDialog has wrong rotation if displayed within a Modal Window and landscape orientation", "creator": { "name": "mkrug", "key": "mkrug", "displayName": "Markus Krug", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mkrug", "key": "mkrug", "displayName": "Markus Krug", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* *Titanium SDK version*: 1.8.2, 2.0.0.v20120328101644 \r\n* *Platform & version*: iOS 5.1\r\n* *Device Details*: iOS simulator\r\n* *Host Operating System*: OSX 10.7.3\r\n* *Titanium Studio version*: 1.0.9", "comment": { "comments": [ { "id": "193151", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "adding orientationModes to the window correct the sample code", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T10:08:42.000+0000", "updated": "2012-04-30T10:08:42.000+0000" }, { "id": "193152", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "adding orientationModes to the window to correct the sample code", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T10:08:49.000+0000", "updated": "2012-04-30T10:08:49.000+0000" }, { "id": "193189", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2104", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T13:39:45.000+0000", "updated": "2012-04-30T13:39:45.000+0000" }, { "id": "193350", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull merged.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-01T15:49:24.000+0000", "updated": "2012-05-01T15:49:24.000+0000" }, { "id": "200359", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested and verified with:\r\nTitanium Studio, build: 2.1.0.201206251749\r\nTitanium SDK: 2.1.0.v20120626104306\r\nDevice: iPhone 4S (5.0.1), iPhone simulator", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-26T11:42:50.000+0000", "updated": "2012-06-26T11:42:50.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }