mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +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>
|
<p>
|
||||||
<button ion-button (click)="openActionSheet()">Open Action Sheet</button>
|
<button ion-button (click)="openActionSheet()">Open Action Sheet</button>
|
||||||
</p>
|
</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>
|
||||||
<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>
|
<ion-list>
|
||||||
@ -460,8 +463,9 @@ export class ModalFirstPage {
|
|||||||
public app: App,
|
public app: App,
|
||||||
public actionSheetCtrl: ActionSheetController,
|
public actionSheetCtrl: ActionSheetController,
|
||||||
public toastCtrl: ToastController,
|
public toastCtrl: ToastController,
|
||||||
public alertCtrl: AlertController) {
|
public alertCtrl: AlertController,
|
||||||
|
public modalCtrl: ModalController,
|
||||||
|
) {
|
||||||
for (let i = 0; i < 50; i++) {
|
for (let i = 0; i < 50; i++) {
|
||||||
this.items.push({
|
this.items.push({
|
||||||
value: (i + 1)
|
value: (i + 1)
|
||||||
@ -550,6 +554,10 @@ export class ModalFirstPage {
|
|||||||
this.called.ionViewDidLeave++;
|
this.called.ionViewDidLeave++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openModal() {
|
||||||
|
this.modalCtrl.create(ContactUs).present();
|
||||||
|
}
|
||||||
|
|
||||||
openActionSheet() {
|
openActionSheet() {
|
||||||
let actionSheet = this.actionSheetCtrl.create({
|
let actionSheet = this.actionSheetCtrl.create({
|
||||||
buttons: [
|
buttons: [
|
||||||
|
@ -58,7 +58,9 @@ let portalZindex = 9999;
|
|||||||
export function setZIndex(nav: NavControllerBase, enteringView: ViewController, leavingView: ViewController, direction: string, renderer: Renderer) {
|
export function setZIndex(nav: NavControllerBase, enteringView: ViewController, leavingView: ViewController, direction: string, renderer: Renderer) {
|
||||||
if (enteringView) {
|
if (enteringView) {
|
||||||
if (nav._isPortal) {
|
if (nav._isPortal) {
|
||||||
|
if (direction === DIRECTION_FORWARD) {
|
||||||
enteringView._setZIndex(nav._zIndexOffset + portalZindex, renderer);
|
enteringView._setZIndex(nav._zIndexOffset + portalZindex, renderer);
|
||||||
|
}
|
||||||
portalZindex++;
|
portalZindex++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user