[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; | ||||
|   margin-left: -250px; | ||||
|   box-shadow: 5px 0px 30px 0px #000; | ||||
|   padding-bottom: 20px; | ||||
| } | ||||
| 
 | ||||
| .scrollable { | ||||
| @ -37,6 +38,9 @@ | ||||
|   padding-right: 20px; | ||||
|   padding-top: 20px; | ||||
|   padding-bottom: 20px; | ||||
|   @media (max-width: 991px) { | ||||
|     padding-bottom: 200px; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @media screen and (max-height: 450px) { | ||||
|  | ||||
| @ -73,11 +73,17 @@ export class MenuComponent implements OnInit { | ||||
|   @HostListener('window:click', ['$event']) | ||||
|   onClick(event) { | ||||
|     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 isMenu = cssClasses.indexOf('menu-click') !== -1; | ||||
| 
 | ||||
|     if (!isHamburger && !this.isServicesPage && !isMenu) { | ||||
|     const isServicesPageOnMobile = this.isServicesPage && this.isSmallScreen(); | ||||
|     if (!isHamburger && !isMenu && (!this.isServicesPage || isServicesPageOnMobile)) { | ||||
|       this.navOpen = false; | ||||
|       return; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user