MOBILE-4521 iframe: Destroy iframe if setting an empty src

In iOS, setting an empty src in an iframe sometimes causes the iframe to get 'stuck' in the empty page
main
Dani Palou 2024-03-14 12:45:56 +01:00
parent 8f880c6cb8
commit 337dba4e9f
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ export class CoreIframeComponent implements OnChanges, OnDestroy {
await CoreIframeUtils.fixIframeCookies(url);
}
this.safeUrl = DomSanitizer.bypassSecurityTrustResourceUrl(url ? CoreFile.convertFileSrc(url) : '');
this.safeUrl = url ? DomSanitizer.bypassSecurityTrustResourceUrl(CoreFile.convertFileSrc(url)) : undefined;
// Now that the URL has been set, initialize the iframe. Wait for the iframe to the added to the DOM.
setTimeout(() => {