Hi,

I had a little query about the Screen.lockOrientation() API.
I just had a review of one of my apps published in the marketplace (which
right now is in private status) that it was working perfectly in FirefoxOS
but not in Firefox Desktop.
Upon investigating the issue I found out that my implementation of
Screen.lockOrientation() is not working in the desktop browser. While I can
certainly conditionally disable it, I just found out this
<https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation>
developer documentation in MDN
<https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation>.
The browser compatibility section states that it has been implemented in
the browser since v26 (related to the resolved *Bug 908058*
<https://bugzilla.mozilla.org/show_bug.cgi?id=908058>).

My implementation is (pretty straightforward)

var orientation = function() {
    if (window.screen.mozLockOrientation('portrait')) {
         // orientation was locked
    } else {
        screen.lockOrientation('portrait');
    }
}

Am I doing something wrong here? Otherwise was the bug only related to
FirefoxOS(b2g) and not Firefox OS.

Regards,
Rabimba Karanjai

[image: Firefox Marketplace]
<https://affiliates.mozilla.org/referral/64564/>
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to