Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-879] orientationModes not effective on ipad

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:54:32.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.4.0
ComponentsiOS
Labelsipad, orientationmodes
ReporterJustin Vincent
Assigneebfreedman (at appcelerator)
Created2011-04-15T02:38:26.000+0000
Updated2011-04-17T01:54:32.000+0000

Description

Put this in app.js


Titanium.UI.iPhone.statusBarHidden = true;

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

win.orientationModes = [

Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT

];

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


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

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

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

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

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

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

Screen shot attached.

Attachments

FileDateSize
screen-shot-2010-05-04-at-30606-pm.png2011-04-15T02:38:27.000+0000485392

Comments

  1. Justin Vincent 2011-04-15

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

  2. Dasher 2011-04-15

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

  3. hal 2011-04-15

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

  4. Stephen Tramer 2011-04-15

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

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

JSON Source