Skip to content

Commit

Permalink
fix(modal): overlay-zindex is not changed in back direction
Browse files Browse the repository at this point in the history
fixes #9409
  • Loading branch information
manucorporat committed Jan 18, 2017
1 parent 6da9eb6 commit fba1596
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/components/modal/test/basic/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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)
Expand Down Expand Up @@ -550,6 +554,10 @@ export class ModalFirstPage {
this.called.ionViewDidLeave++;
}

openModal() {
this.modalCtrl.create(ContactUs).present();
}

openActionSheet() {
let actionSheet = this.actionSheetCtrl.create({
buttons: [
Expand Down
4 changes: 3 additions & 1 deletion src/navigation/nav-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fba1596

Please sign in to comment.