fix(modal): overlay-zindex is not changed in back direction

fixes #9409
This commit is contained in:
Manu Mtz.-Almeida
2016-12-08 23:54:27 +01:00
parent 6da9eb6398
commit fba159662e
2 changed files with 13 additions and 3 deletions

View File

@ -441,6 +441,9 @@ export class ContactUs {
<p>
<button ion-button (click)="openActionSheet()">Open Action Sheet</button>
</p>
<p>
<button ion-button (click)="openModal()">Open same modal</button>
</p>
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
<ion-list>
@ -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: [

View File

@ -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) {
if (direction === DIRECTION_FORWARD) {
enteringView._setZIndex(nav._zIndexOffset + portalZindex, renderer);
}
portalZindex++;
return;
}