Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Merge branch 'ts-mobileHamburgerMenuScrolling' into 'master'
Browse files Browse the repository at this point in the history
Fix hamburgerMenu scrolling in mobile (on Interface)

See merge request hedera/myhbarwallet!373
  • Loading branch information
cacampbell committed Sep 18, 2019
2 parents ce4aa06 + 219e2a4 commit 50dd2d2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/HeaderHamburgerButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ export default createComponent({
return props.isOpen ? `bar-${ind}-anim` : `bar-${ind}`;
}
function setHamburgerMenuIsOpenOnBody(open: boolean): void {
console.log(open);
document.body.classList.toggle("ham-menu-is-open", open);
}
function handleToggle(): void {
context.emit("toggle", !props.isOpen);
setHamburgerMenuIsOpenOnBody(!props.isOpen);
}
return {
Expand Down
8 changes: 7 additions & 1 deletion src/components/HeaderHamburgerMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ nav {
.logout-container {
margin-inline-end: 10px;
padding-block: 5px;
@supports (-webkit-overflow-scrolling: touch) {
padding-block-end: 100px;
}
}
.logout {
Expand All @@ -184,7 +189,8 @@ nav {
.nav-open {
box-shadow: 0 calc(100vh - 85px) 0 calc(100vh - 85px) rgba(0, 0, 0, 0.8);
height: 100vh;
height: calc(100vh - 85px);
overflow-y: scroll;
@media (prefers-reduced-motion) {
transition: none;
Expand Down
8 changes: 8 additions & 0 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ body {
&.modal-is-open {
overflow: hidden;
}

&.ham-menu-is-open {
overflow: hidden;

@supports (-webkit-overflow-scrolling: touch) {
position: fixed;
}
}
}

0 comments on commit 50dd2d2

Please sign in to comment.