Skip to content
Snippets Groups Projects
Unverified Commit 45f43f6d authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Only select slots with no name attribute for removal

parent 7d22103d
No related branches found
No related tags found
No related merge requests found
Pipeline #44870 passed
...@@ -847,11 +847,12 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { ...@@ -847,11 +847,12 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
const mainClassMap = classMap({hidden: appHidden}); const mainClassMap = classMap({hidden: appHidden});
const slotClassMap = classMap({hidden: !appHidden}); const slotClassMap = classMap({hidden: !appHidden});
// XXX: Safari doesn't like CSS being applied to slots or via HTML, // XXX: Safari 11 doesn't like CSS being applied to slots or via HTML,
// so we have to remove the slow instead of hiding it // so we have to remove the slot instead of hiding it
if (!appHidden) { if (!appHidden) {
this.updateComplete.then(() => { this.updateComplete.then(() => {
const slot = this.shadowRoot.querySelector("slot"); // select slots with no name attribute
const slot = this.shadowRoot.querySelector("slot:not([name])");
if (slot) if (slot)
slot.remove(); slot.remove();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment