diff --git a/src/components/modal/test/basic/app.module.ts b/src/components/modal/test/basic/app.module.ts index cc872f1be44..f895ccc6707 100644 --- a/src/components/modal/test/basic/app.module.ts +++ b/src/components/modal/test/basic/app.module.ts @@ -441,6 +441,9 @@ export class ContactUs {

+

+ +

@@ -460,8 +463,9 @@ export class ModalFirstPage { public app: App, public actionSheetCtrl: ActionSheetController, public toastCtrl: ToastController, - public alertCtrl: AlertController) { - + public alertCtrl: AlertController, + public modalCtrl: ModalController, + ) { for (let i = 0; i < 50; i++) { this.items.push({ value: (i + 1) @@ -550,6 +554,10 @@ export class ModalFirstPage { this.called.ionViewDidLeave++; } + openModal() { + this.modalCtrl.create(ContactUs).present(); + } + openActionSheet() { let actionSheet = this.actionSheetCtrl.create({ buttons: [ diff --git a/src/navigation/nav-util.ts b/src/navigation/nav-util.ts index aade5a88e77..277b2ad16aa 100644 --- a/src/navigation/nav-util.ts +++ b/src/navigation/nav-util.ts @@ -58,7 +58,9 @@ let portalZindex = 9999; export function setZIndex(nav: NavControllerBase, enteringView: ViewController, leavingView: ViewController, direction: string, renderer: Renderer) { if (enteringView) { if (nav._isPortal) { - enteringView._setZIndex(nav._zIndexOffset + portalZindex, renderer); + if (direction === DIRECTION_FORWARD) { + enteringView._setZIndex(nav._zIndexOffset + portalZindex, renderer); + } portalZindex++; return; }