mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 10:13:52 -04:00
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>