Im using Angular 13 for my application. And I used angular-material Mat-Dialog box as a pop up modal. This is the HTML code of the submit and close buttons.
<mat-dialog-actions>
<button class="btn" mat-raised-button color="accent" (click)="closeModal()">
<span class="btn-text">CLOSE</span>
</button>
<button class="btn" mat-raised-button style="background-color: #CF466F;" (click)="deleteAd(data.id)">
<span *ngIf="loading" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
<span *ngIf="!loading" class="btn-text">YES, DELETE</span>
</button>
Everything worked properly in Desktop & Android mobile devices. But it's not working properly in IOS devices. Here submit button is functioning as expected in my I phone (IOS version 12.5.5). But the close button is not working. And when the modal is poped up, it cant be closed since the close button is not functioning.
This is my Typescript code.
closeModal(): void {
this.ngZone.run(() => {
this.dialogRef.close();
});
}
Can someone help me with this?