Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9520 from mcirlanaru/bug_849339
Browse files Browse the repository at this point in the history
Bug 849339 - Lock orientation to portrait when showing sleep menu, r=alive
  • Loading branch information
mihai committed May 3, 2013
2 parents 3b3ef5c + 1f235f4 commit 5840913
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/system/js/sleep_menu.js
Expand Up @@ -103,6 +103,8 @@ var SleepMenu = {
this.elements.container.innerHTML = '';
this.buildMenu(this.generateItems());
this.elements.overlay.classList.add('visible');
// Lock orientation to portrait
screen.mozLockOrientation('portrait-primary');
},

buildMenu: function sm_buildMenu(items) {
Expand All @@ -116,6 +118,9 @@ var SleepMenu = {

hide: function lm_hide() {
this.elements.overlay.classList.remove('visible');
// Reset the orientation for the currently running app
var currentApp = WindowManager.getDisplayedApp();
WindowManager.setOrientationForApp(currentApp);
},

handleEvent: function sm_handleEvent(evt) {
Expand Down

0 comments on commit 5840913

Please sign in to comment.