From 45f43f6d6e828b9f69b7f3c183b0293c543c6915 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Wed, 9 Jun 2021 09:34:20 +0200 Subject: [PATCH] Only select slots with no name attribute for removal --- packages/app-shell/src/app-shell.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js index 3ccad939..f855ea48 100644 --- a/packages/app-shell/src/app-shell.js +++ b/packages/app-shell/src/app-shell.js @@ -847,11 +847,12 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { const mainClassMap = classMap({hidden: appHidden}); const slotClassMap = classMap({hidden: !appHidden}); - // XXX: Safari doesn't like CSS being applied to slots or via HTML, - // so we have to remove the slow instead of hiding it + // 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 if (!appHidden) { 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) slot.remove(); }); -- GitLab