From ab2313dc003f70501880110f59303ba4d9400774 Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Sat, 19 Aug 2023 19:16:09 +0200 Subject: [PATCH] Wait for custom UI (#1523) --- .../manage-plugins/custom-plugins/custom-plugins.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts index 886481cb9..071c99dda 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts @@ -123,9 +123,6 @@ export class CustomPluginsComponent implements OnInit, OnDestroy { this.iframe = this.customPluginUiElementTarget.nativeElement as HTMLIFrameElement; this.iframe.src = environment.api.base + this.basePath + '/index.html?origin=' + encodeURIComponent(location.origin) + '&v=' + encodeURIComponent(this.plugin.installedVersion); - this.iframe.onload = () => { - this.uiLoaded = true; - }; } handleMessage = (e: MessageEvent) => { @@ -134,6 +131,7 @@ export class CustomPluginsComponent implements OnInit, OnDestroy { case 'loaded': this.injectDefaultStyles(e); this.confirmReady(e); + this.uiLoaded = true; break; case 'request': { this.handleRequest(e);