Skip to content

Commit

Permalink
Remove spinnerctn for wc in modal or drawer (#3371)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDoberer authored Jul 28, 2023
1 parent fcffa26 commit e202e8e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/src/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -379,7 +379,7 @@
</div>
{#if showLoadingIndicator}
<div
class="fd-page spinnerContainer fade-in-out"
class="fd-page spinnerContainer fade-out"
aria-hidden="false"
aria-label="Loading"
>
Expand Down Expand Up @@ -506,7 +506,7 @@
position: relative;
}
.fade-in-out {
.fade-out {
opacity: 1;
}
</style>

0 comments on commit e202e8e

Please sign in to comment.