<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I had a little query about the Screen.lockOrientation() API.<br></div>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.<br></div>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 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation" target="_blank">this</a> developer documentation in <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation" target="_blank">MDN</a>. The browser compatibility section states that it has been implemented in the browser since v26 (related to the resolved <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=908058" target="_blank"><b>Bug 908058</b></a>).<br><br></div>My implementation is (pretty straightforward)<br><br>var orientation = function() {<br>    if (window.screen.mozLockOrientation('portrait')) {<br>         // orientation was locked<br>    } else {<br>        screen.lockOrientation('portrait');<br>    }<br>}<br><div><div><div><div><div><br></div><div>Am I doing something wrong here? Otherwise was the bug only related to FirefoxOS(b2g) and not Firefox OS.<br><br clear="all"><div><div dir="ltr"><div>Regards,<br></div>Rabimba Karanjai<br><br><img class="fcdtufvwjaibwxehtrjs" src="https://affiliates.mozilla.org/media/uploads/image_banners/803bf99f9621164871eacd1251079ebb63861c00.png" alt=""><img class="fcdtufvwjaibwxehtrjs" src="https://affiliates.mozilla.org/media/uploads/image_banners/803bf99f9621164871eacd1251079ebb63861c00.png" alt=""><a href="https://affiliates.mozilla.org/referral/64564/" target="_blank"><img alt="Firefox Marketplace" src="http://image.slidesharecdn.com/firefoxmarketplace-140703170744-phpapp02/95/firefox-marketplace-1-638.jpg?cb=1404425414" height="72" width="96"></a><br></div></div>
</div></div></div></div></div></div>
</div><br></div>