From c7184fb3b96032f1620f84aa00b7827c32e8a87b Mon Sep 17 00:00:00 2001 From: emagrina <94017645+emagrina@users.noreply.github.com> Date: Sat, 5 Dec 2026 00:59:05 +0100 Subject: [PATCH 1/2] Sync compact mode state attribute when its observer reconnects zen-compact-mode-active could stay set on the sidebar after a panel closed while compact mode was off, keeping the sidebar visible after re-enabling compact mode. --- src/zen/common/modules/ZenHasPolyfill.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/zen/common/modules/ZenHasPolyfill.mjs b/src/zen/common/modules/ZenHasPolyfill.mjs index 67ce1c627e9..8f727823a3a 100644 --- a/src/zen/common/modules/ZenHasPolyfill.mjs +++ b/src/zen/common/modules/ZenHasPolyfill.mjs @@ -61,6 +61,7 @@ class nsHasPolyfill { observer, element, attributeFilter, + updateState, }); return observerId; } @@ -83,6 +84,10 @@ class nsHasPolyfill { ? observer.attributeFilter : undefined, }); + // The state attribute may be stale: it can be set while the observer + // was disconnected (e.g. a panel closed after leaving compact mode), so + // sync it now instead of waiting for the next mutation. + observer.updateState(); } } From 861217a82915479e680f9cfe1febda22fe109522 Mon Sep 17 00:00:00 2001 From: Mauro Date: Sat, 5 Dec 2026 01:59:12 +0100 Subject: [PATCH 2/2] no-bug: Remove comment --- src/zen/common/modules/ZenHasPolyfill.mjs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/zen/common/modules/ZenHasPolyfill.mjs b/src/zen/common/modules/ZenHasPolyfill.mjs index 8f727823a3a..256f05fe838 100644 --- a/src/zen/common/modules/ZenHasPolyfill.mjs +++ b/src/zen/common/modules/ZenHasPolyfill.mjs @@ -84,9 +84,6 @@ class nsHasPolyfill { ? observer.attributeFilter : undefined, }); - // The state attribute may be stale: it can be set while the observer - // was disconnected (e.g. a panel closed after leaving compact mode), so - // sync it now instead of waiting for the next mutation. observer.updateState(); } }