Skip to content

Commit

Permalink
Media menu: close open slide out menu when media menu closes
Browse files Browse the repository at this point in the history
Issue: #318
  • Loading branch information
Internet Archive authored and Internet Archive committed Oct 8, 2019
1 parent 136aec4 commit b1a4018
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/mobile-top-nav/src/media-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ class MediaMenu extends LitElement {
this.tabHeightMultiplier = 0;
}

updated(changedProperties) {
const { mediaMenuOpen, mediaSliderOpen } = this;
const menuClosed =
changedProperties.has('mediaMenuOpen') &&
changedProperties.get('mediaMenuOpen') &&
!mediaMenuOpen;

if (menuClosed && mediaSliderOpen) {
this.mediaSliderOpen = false;
this.mediaSliderAnimate = false;
}
}

mediaSlider(tabMultiplier) {
// Only keep side menu open until menu closed
// Shift menu downwards as per button clicked
Expand Down

0 comments on commit b1a4018

Please sign in to comment.