mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(modal): overlay-zindex is not changed in back direction
fixes #9409
This commit is contained in:
@ -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: [
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user