forked from EVOgeek/Vmeda.Online
		
	MOBILE-3068 ionic: Close modals before going back
This commit is contained in:
		
							parent
							
								
									aafab95e8e
								
							
						
					
					
						commit
						f3debfab1f
					
				| @ -65,6 +65,19 @@ export class MoodleMobileApp implements OnInit { | ||||
|                     app.setElementClass('platform-windows', true); | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             // Register back button action to allow closing modals before anything else.
 | ||||
|             this.appProvider.registerBackButtonAction(() => { | ||||
|                 // Following function is hidden in Ionic Code, however there's no solution for that.
 | ||||
|                 const portal = app._getActivePortal(); | ||||
|                 if (portal) { | ||||
|                     portal.pop(); | ||||
| 
 | ||||
|                     return true; | ||||
|                 } | ||||
| 
 | ||||
|                 return false; | ||||
|             }, 2000); | ||||
|         }); | ||||
| 
 | ||||
|     } | ||||
|  | ||||
| @ -1012,6 +1012,11 @@ ion-app.app-root { | ||||
|   ion-alert .alert-checkbox-button .alert-checkbox-label { | ||||
|     white-space: normal; | ||||
|   } | ||||
| 
 | ||||
|   ion-backdrop { | ||||
|     transition: opacity 100ms ease-in-out; | ||||
|     opacity: .1; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @each $color-name, $color-base, $color-contrast in get-colors($colors) { | ||||
|  | ||||
| @ -178,7 +178,7 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy { | ||||
|     showContextMenu(event: MouseEvent): void { | ||||
|         if (!this.expanded) { | ||||
|             const popover = this.popoverCtrl.create(CoreContextMenuPopoverComponent, | ||||
|                 { title: this.title, items: this.items, id: this.uniqueId }); | ||||
|                 { title: this.title, items: this.items, id: this.uniqueId, showBackdrop: true }); | ||||
| 
 | ||||
|             popover.onDidDismiss(() => { | ||||
|                 this.expanded = false; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user