mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
fix(nav): zIndex in overlays
This commit is contained in:

committed by
Adam Bradley

parent
7201999674
commit
70f8a8e5eb
@ -33,9 +33,10 @@ export class E2EPage {
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Play',
|
||||
text: 'Play (open modal)',
|
||||
icon: 'arrow-dropright-circle',
|
||||
handler: () => {
|
||||
this.result = 'Play (open modal)';
|
||||
let modal = this.modalCtrl.create(ModalPage);
|
||||
modal.present();
|
||||
|
||||
|
@ -19,7 +19,7 @@ export const AppRootToken = new OpaqueToken('USERROOT');
|
||||
'<div #modalPortal overlay-portal></div>' +
|
||||
'<div #overlayPortal overlay-portal></div>' +
|
||||
'<div #loadingPortal class="loading-portal" overlay-portal></div>' +
|
||||
'<div #toastPortal class="toast-portal" overlay-portal></div>' +
|
||||
'<div #toastPortal class="toast-portal" [overlay-portal]="10000"></div>' +
|
||||
'<div class="click-block"></div>'
|
||||
})
|
||||
export class IonicApp extends Ion implements OnInit {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ComponentFactoryResolver, Directive, ElementRef, forwardRef, Inject, NgZone, Optional, Renderer, ViewContainerRef } from '@angular/core';
|
||||
import { ComponentFactoryResolver, Directive, ElementRef, forwardRef, Inject, Input, NgZone, Optional, Renderer, ViewContainerRef } from '@angular/core';
|
||||
|
||||
import { App } from '../app/app';
|
||||
import { Config } from '../../config/config';
|
||||
@ -12,7 +12,7 @@ import { TransitionController } from '../../transitions/transition-controller';
|
||||
* @private
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[overlay-portal]'
|
||||
selector: '[overlay-portal]',
|
||||
})
|
||||
export class OverlayPortal extends NavControllerBase {
|
||||
constructor(
|
||||
@ -38,4 +38,10 @@ export class OverlayPortal extends NavControllerBase {
|
||||
app.viewDidLeave.subscribe(this.dismissPageChangeViews.bind(this));
|
||||
}
|
||||
|
||||
@Input('overlay-portal')
|
||||
set _overlayPortal(val: number) {
|
||||
this._zIndexOffset = (val || 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user