From e202e8ec12fc0a127e1d73e333517b54e53480cd Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Fri, 28 Jul 2023 14:06:59 +0200 Subject: [PATCH] Remove spinnerctn for wc in modal or drawer (#3371) --- core/src/Modal.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/Modal.svelte b/core/src/Modal.svelte index 670a6a32a2..a6961bbcf1 100644 --- a/core/src/Modal.svelte +++ b/core/src/Modal.svelte @@ -285,7 +285,7 @@ window.focus(); // activate loadingindicator if onMount function takes longer than expected setTimeout(() => { - if(!contextRequested){ + if(!contextRequested && !nodeObject.webcomponent){ showLoadingIndicator = true; } }, 250); @@ -315,9 +315,9 @@ * After 250 ms the spinner will be removed from DOM. */ function fadeOutLoadingIndicator() { - const spinnerContainer = document.querySelector('.spinnerContainer'); - if (spinnerContainer && spinnerContainer.classList.contains("fade-in-out")) { - spinnerContainer.classList.remove("fade-in-out"); + const spinnerContainer = document.querySelector(`${isModal ? '.lui-modal-mf' : '.drawer'} .spinnerContainer`); + if (spinnerContainer && spinnerContainer.classList.contains("fade-out")) { + spinnerContainer.classList.remove("fade-out"); setTimeout(() => { showLoadingIndicator = false; }, 250); @@ -379,7 +379,7 @@ {#if showLoadingIndicator}
@@ -506,7 +506,7 @@ position: relative; } - .fade-in-out { + .fade-out { opacity: 1; }