<div dir="ltr"><div>The MDN docs clearly state "<b>Gecko notes</b> This API is currently in draft form. It is only implemented as a prefixed method (mozLockOrientation) in B2G and Firefox for Android."<br><br></div>Kevin<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 12:06 AM, Kevin Brosnan <span dir="ltr"><<a href="mailto:kbrosnan@gmail.com" target="_blank">kbrosnan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Bug 908058 looks to implement it for Firefox on Android and Firefox OS only. I don't see a desktop implementation in that code.<br><br></div>Kevin<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Sep 12, 2014 at 5:20 PM, Rabimba Karanjai <span dir="ltr"><<a href="mailto:karanjai.moz@gmail.com" target="_blank">karanjai.moz@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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 alt=""><img alt=""><a href="https://affiliates.mozilla.org/referral/64564/" target="_blank"><img alt="Firefox Marketplace" height="72" width="96"></a><br></div></div>
</div></div></div></div></div></div>
</div><br></div>
<br></div></div>_______________________________________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>