Files
FreshRSS/p/scripts
polybjorn c43930cfd1 fix(js): stop sidebar auto-reopening on page navigation (#8773)
After #8747 the sidebar would re-open on its own when navigating
(e.g. clicking the logo) on sessions where sessionStorage said
the sidebar should be closed.

init_nav_menu() ran toggle_aside_click() to honour the stored
state, then gated a follow-up `.visible` re-add on
`getComputedStyle(aside).display !== 'none'`. Before #8747 that
gate worked because the close path set `aside.style.display =
'none'` inline; #8747 replaced that with an `is-hidden` class
applied only at wide viewports, so at narrow viewports the
computed display stays `table-cell` after closing and the gate
wrongly re-adds `.visible`, sliding the drawer open.

Gate on the toggle button's `.active` state instead. It's the
real source of truth for "should the sidebar be open" and is
already used elsewhere in the same function.

Fixes #8771

Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
2026-05-03 14:16:33 +02:00
..
2022-05-15 21:52:52 +02:00