{ "id": "61511", "key": "TIMOB-879", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:32.000+0000", "created": "2011-04-15T02:38:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ipad", "orientationmodes" ], "versions": [], "issuelinks": [], "assignee": { "name": "bfreedman(atappcelerator)", "key": "bfreedman(atappcelerator)", "displayName": "bfreedman (at appcelerator)", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:32.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": "{html}

Put this in app.js

\n
\n

Titanium.UI.iPhone.statusBarHidden = true;

\n

var webView = Titanium.UI.createWebView({url:'http://google.com'});
\nvar win = Titanium.UI.createWindow({fullscreen: true});

\n

win.orientationModes = [

\n
\nTitanium.UI.PORTRAIT,\nTitanium.UI.UPSIDE_PORTRAIT\n
\n

];

\n

win.add(webView);
\nwin.open();

\n
\n

I know that there would be no reason to limit orientationModes\nfor displaying google.

\n

However, I am building a two player board game (like chess) in\nHTML/JavaScript.

\n

The idea is to replicate a real board with both players sitting\nat each end of the ipad. It doesn't make sense for the board to be\nan any orientation other than portrait - so ideally I need to be\nable to lock the orientation to PORTRAIT or UPSIDE_PORTRAIT

\n

Hunting through he docs I see there is a way to do this with\nwin.orientationModes, but it doesn't work in the case outlined\nabove.

\n

I wonder if it may be that Titanium.UI.createWebView also needs\norientationModes?

\n

I've tested in the simulator and on an ipad, same issue in both\nplaces.

\n

Screen shot attached.

{html}", "attachment": [ { "id": "17888", "filename": "screen-shot-2010-05-04-at-30606-pm.png", "author": { "name": "justinvincent", "key": "justinvincent", "displayName": "Justin Vincent", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:27.000+0000", "size": 485392, "mimeType": "image/png" } ], "flagged": false, "summary": "orientationModes not effective on ipad", "creator": { "name": "justinvincent", "key": "justinvincent", "displayName": "Justin Vincent", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "justinvincent", "key": "justinvincent", "displayName": "Justin Vincent", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124258", "author": { "name": "justinvincent", "key": "justinvincent", "displayName": "Justin Vincent", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I'm not sure who the general public should assign tickets to, so\nI assigned it to Bill Dawson 'cos your name came up a lot!

{html}", "updateAuthor": { "name": "justinvincent", "key": "justinvincent", "displayName": "Justin Vincent", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:27.000+0000", "updated": "2011-04-15T02:38:27.000+0000" }, { "id": "124259", "author": { "name": "dasher", "key": "dasher", "displayName": "Dasher", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This also appears to be an issue on Android with the 1.3 Ti\nSDK.

{html}", "updateAuthor": { "name": "dasher", "key": "dasher", "displayName": "Dasher", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:28.000+0000", "updated": "2011-04-15T02:38:28.000+0000" }, { "id": "124260", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Note that setting the orientation mode works fine in Ti 1.2, but\nwas broken in 1.3.
\nIs a fix scheduled for 1.4?

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:28.000+0000", "updated": "2011-04-15T02:38:28.000+0000" }, { "id": "124261", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This appears to be a duplicate of a bug that either Blain or I\nfixed, relating to orientation on the iPad. With the provided test\ncode I was able to get the window to orient only when in one of the\nportrait-style modes, which seems to be what you want.

\n

If this is still a problem with Android, I'd create a separate\nticket for that. They may also have been working on orientation\nissues, I'm not sure.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:28.000+0000", "updated": "2011-04-15T02:38:28.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }