mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(angular): keepContentsMounted modal is sized correctly (#26917)
resolves #26916
This commit is contained in:
@ -80,7 +80,7 @@ export declare interface IonModal extends Components.IonModal {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-modal',
|
selector: 'ion-modal',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
template: `<div class="ion-page" *ngIf="isCmpOpen || keepContentsMounted">
|
template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
|
||||||
<ng-container [ngTemplateOutlet]="template"></ng-container>
|
<ng-container [ngTemplateOutlet]="template"></ng-container>
|
||||||
</div>`,
|
</div>`,
|
||||||
inputs: [
|
inputs: [
|
||||||
|
|||||||
@ -27,6 +27,12 @@ describe('overlays - keepContentsMounted', () => {
|
|||||||
|
|
||||||
cy.get('ion-modal ion-content').should('exist');
|
cy.get('ion-modal ion-content').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should has ion-delegate-host on mount', () => {
|
||||||
|
cy.visit('/keep-contents-mounted');
|
||||||
|
|
||||||
|
cy.get('ion-modal .ion-delegate-host').should('exist');
|
||||||
|
});
|
||||||
})
|
})
|
||||||
describe('popover', () => {
|
describe('popover', () => {
|
||||||
it('should not mount component if false', () => {
|
it('should not mount component if false', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user