Skip to content

Commit 8d184c8

Browse files
authoredMar 7, 2023
fix(angular): keepContentsMounted modal is sized correctly (#26917)
resolves #26916
1 parent 0afc619 commit 8d184c8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎angular/src/directives/overlays/modal.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export declare interface IonModal extends Components.IonModal {
8080
@Component({
8181
selector: 'ion-modal',
8282
changeDetection: ChangeDetectionStrategy.OnPush,
83-
template: `<div class="ion-page" *ngIf="isCmpOpen || keepContentsMounted">
83+
template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
8484
<ng-container [ngTemplateOutlet]="template"></ng-container>
8585
</div>`,
8686
inputs: [

‎angular/test/base/e2e/src/keep-contents-mounted.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ describe('overlays - keepContentsMounted', () => {
2727

2828
cy.get('ion-modal ion-content').should('exist');
2929
});
30+
31+
it('should has ion-delegate-host on mount', () => {
32+
cy.visit('/keep-contents-mounted');
33+
34+
cy.get('ion-modal .ion-delegate-host').should('exist');
35+
});
3036
})
3137
describe('popover', () => {
3238
it('should not mount component if false', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.