Skip to content

Commit

Permalink
Merge pull request mozilla-b2g#7353 from vingtetun/827288
Browse files Browse the repository at this point in the history
Bug 827288 - Pressing home to exit activity picker gets device into bust...
  • Loading branch information
vingtetun committed Jan 8, 2013
2 parents 7548e58 + 1e8ecd4 commit 39caebc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
24 changes: 14 additions & 10 deletions apps/system/js/list_menu.js
Expand Up @@ -124,12 +124,15 @@ var ListMenu = {
return;

var self = this;
this.container.addEventListener('transitionend',
function onTransitionEnd() {
self.element.classList.remove('visible');
self.container.removeEventListener('transitionend', onTransitionEnd);
});
this.container.classList.add('slidedown');
var container = this.container;
container.addEventListener('transitionend', function list_hide() {
container.removeEventListener('transitionend', list_hide);
self.element.classList.remove('visible');
});

setTimeout(function() {
container.classList.add('slidedown');
});
},

handleEvent: function lm_handleEvent(evt) {
Expand Down Expand Up @@ -162,10 +165,11 @@ var ListMenu = {
break;

case 'home':
if (this.visible) {
this.hide();
this.oncancel();
}
if (!this.visible)
return;

this.hide();
this.oncancel();
break;
}
}
Expand Down
7 changes: 2 additions & 5 deletions apps/system/style/list_menu/list_menu.css
Expand Up @@ -6,7 +6,8 @@
visibility: visible;
}

#listmenu menu {
#listmenu menu,
#listmenu.visible menu.slidedown {
transition: transform 0.3s ease;
transform: translateY(100%);
}
Expand All @@ -15,10 +16,6 @@
transform: translateY(0);
}

#listmenu menu.slidedown {
transform: translateY(100%);
}

#listmenu menu button.icon,
#listmenu menu a[role="button"].icon {
background-repeat: no-repeat;
Expand Down

0 comments on commit 39caebc

Please sign in to comment.