Skip to content

Commit

Permalink
fix(angular): keepContentsMounted modal is sized correctly (#26917)
Browse files Browse the repository at this point in the history
resolves #26916
  • Loading branch information
liamdebeasi committed Mar 7, 2023
1 parent 0afc619 commit 8d184c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion angular/src/directives/overlays/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export declare interface IonModal extends Components.IonModal {
@Component({
selector: 'ion-modal',
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>
</div>`,
inputs: [
Expand Down
6 changes: 6 additions & 0 deletions angular/test/base/e2e/src/keep-contents-mounted.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ describe('overlays - keepContentsMounted', () => {

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', () => {
it('should not mount component if false', () => {
Expand Down

0 comments on commit 8d184c8

Please sign in to comment.