From d8e29f13866c700c9acbeeaeb91c34185d91f51b Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Wed, 22 Nov 2023 15:23:52 +0100 Subject: [PATCH] Re-Apply: Fix SSE failure toast container not removed (#2182) This re-applies the fix from #2075, which must have been lost while rebasing #1987. Signed-off-by: Florian Hotze --- .../web/src/components/connection-health-mixin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/connection-health-mixin.js b/bundles/org.openhab.ui/web/src/components/connection-health-mixin.js index 914482da6d..aa8cd8b38c 100644 --- a/bundles/org.openhab.ui/web/src/components/connection-health-mixin.js +++ b/bundles/org.openhab.ui/web/src/components/connection-health-mixin.js @@ -24,7 +24,7 @@ export default { text: message, closeButton: reloadButton, closeButtonText: this.$t('dialogs.reload'), - destroyOnClose: autoClose, + destroyOnClose: true, closeTimeout: (autoClose) ? 5000 : undefined, cssClass: 'failure-toast button-outline', position: 'bottom', @@ -51,7 +51,6 @@ export default { this.communicationFailureTimeoutId = setTimeout(() => { if (this.communicationFailureToast !== null) return this.communicationFailureToast = this.displayFailureToast(this.$t('error.communicationFailure'), true, false) - this.communicationFailureToast.open() this.communicationFailureTimeoutId = null }, 1000) } @@ -59,7 +58,6 @@ export default { if (this.communicationFailureTimeoutId !== null) clearTimeout(this.communicationFailureTimeoutId) if (this.communicationFailureToast !== null) { this.communicationFailureToast.close() - this.communicationFailureToast.destroy() this.communicationFailureToast = null } }