perf(many): reduce delay when performing overlay or page transitions (#26189)

resolves #24346
This commit is contained in:
Liam DeBeasi
2022-11-01 12:08:27 -05:00
committed by GitHub
parent eea6ba996c
commit 30e3a1485d
8 changed files with 57 additions and 56 deletions

View File

@ -17,7 +17,7 @@ import type {
} from '../../interface';
import { findIonContent, printIonContentErrorMsg } from '../../utils/content';
import { CoreDelegate, attachComponent, detachComponent } from '../../utils/framework-delegate';
import { raf, inheritAttributes } from '../../utils/helpers';
import { raf, inheritAttributes, hasLazyBuild } from '../../utils/helpers';
import type { Attributes } from '../../utils/helpers';
import { KEYBOARD_DID_OPEN } from '../../utils/keyboard/keyboard';
import { printIonWarning } from '../../utils/logging';
@ -436,7 +436,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
return;
}
const { presentingElement } = this;
const { presentingElement, el } = this;
/**
* When using an inline modal
@ -462,9 +462,8 @@ export class Modal implements ComponentInterface, OverlayInterface {
};
const { inline, delegate } = this.getDelegate(true);
this.usersElement = await attachComponent(delegate, this.el, this.component, ['ion-page'], data, inline);
await deepReady(this.usersElement);
this.usersElement = await attachComponent(delegate, el, this.component, ['ion-page'], data, inline);
hasLazyBuild(el) && (await deepReady(this.usersElement));
writeTask(() => this.el.classList.add('show-modal'));