From aed0081990585148eb17b30cb411efc789dc0f6c Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Wed, 16 Aug 2023 00:45:33 +1000 Subject: [PATCH] fix(panel): restore resizeability css width var had been applied to panel and to panel parent separately, freezing the panel at an initial pos --- src/core/islands/Panel.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/islands/Panel.mjs b/src/core/islands/Panel.mjs index e37c8fd..e93af04 100644 --- a/src/core/islands/Panel.mjs +++ b/src/core/islands/Panel.mjs @@ -210,6 +210,7 @@ function Panel({ if (!$panel.hasAttribute("open")) width = 0; const $cssVarTarget = $panel.parentElement || $panel; $cssVarTarget.style.setProperty("--panel--width", `${width}px`); + if ($cssVarTarget !== $panel) $panel.style.removeProperty("--panel--width"); repositionHelp(width); }; $panel.open = () => {