[menu] fix menu close trigger, fix menu scroll on mobile safari
This commit is contained in:
parent
c5f0608b46
commit
379e1470fd
@ -8,6 +8,7 @@
|
|||||||
transition: 0.25s;
|
transition: 0.25s;
|
||||||
margin-left: -250px;
|
margin-left: -250px;
|
||||||
box-shadow: 5px 0px 30px 0px #000;
|
box-shadow: 5px 0px 30px 0px #000;
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollable {
|
.scrollable {
|
||||||
@ -37,6 +38,9 @@
|
|||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
padding-bottom: 200px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-height: 450px) {
|
@media screen and (max-height: 450px) {
|
||||||
|
@ -73,11 +73,17 @@ export class MenuComponent implements OnInit {
|
|||||||
@HostListener('window:click', ['$event'])
|
@HostListener('window:click', ['$event'])
|
||||||
onClick(event) {
|
onClick(event) {
|
||||||
const cssClasses = event.target.className;
|
const cssClasses = event.target.className;
|
||||||
|
if (!cssClasses.indexOf) { // Click on chart or non html thingy, close the menu
|
||||||
|
this.navOpen = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const isHamburger = cssClasses.indexOf('profile_image') !== -1;
|
const isHamburger = cssClasses.indexOf('profile_image') !== -1;
|
||||||
const isMenu = cssClasses.indexOf('menu-click') !== -1;
|
const isMenu = cssClasses.indexOf('menu-click') !== -1;
|
||||||
|
const isServicesPageOnMobile = this.isServicesPage && this.isSmallScreen();
|
||||||
if (!isHamburger && !this.isServicesPage && !isMenu) {
|
if (!isHamburger && !isMenu && (!this.isServicesPage || isServicesPageOnMobile)) {
|
||||||
this.navOpen = false;
|
this.navOpen = false;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user