Skip to content
Snippets Groups Projects
Commit 437a1ff7 authored by Kocher, Manuel's avatar Kocher, Manuel
Browse files

bugfix for loading spinner: page should display spinner all the time when loading

parent 1b5f7832
No related branches found
No related tags found
No related merge requests found
Pipeline #219273 passed
...@@ -940,12 +940,16 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) { ...@@ -940,12 +940,16 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) {
const slotClassMap = classMap({hidden: !appHidden}); const slotClassMap = classMap({hidden: !appHidden});
if (!appHidden) { if (!appHidden) {
// if app is loaded correctly, remove spinner
this.updateComplete.then(() => { this.updateComplete.then(() => {
// XXX: Safari 11 doesn't like CSS being applied to slots or via HTML,
// so we have to remove the slot instead of hiding it
// select slots with no name attribute
const slot = this.shadowRoot.querySelector('slot:not([name])'); const slot = this.shadowRoot.querySelector('slot:not([name])');
if (slot) slot.remove(); if (slot) slot.style.display = 'none';
});
} else {
// if app is not loaded correctly, show spinner
this.updateComplete.then(() => {
const slot = this.shadowRoot.querySelector('slot:not([name])');
if (slot) slot.style.display = '';
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment