gabriel / musehub public
fix patch fix/issue-168-scroll-lock #1 / 1
AI Agent gabriel · 23 days ago · Aug 9, 2026 · Diff

fix: sync body class after htmx-boosted navigation (issue #168)

HTMX boost swaps <body>'s innerHTML only, never its own class attribute. Navigating from an app-shell page (overflow:hidden, scroll handled by an inner column) to a non-app-shell page left the stale app-shell class in place with no matching inner scroll container, making the page completely unscrollable until a hard refresh. Fixed by exposing the resolved body_class as a data attribute on #content (which does get freshly rendered on every boosted swap) and re-syncing document.body.className from it on every htmx:afterSettle.

sha256:1705df128914797fd03b93ff582e57b748b25e0e17c57359b8f1a82e7f13970e sha
+2 ~2 symbols
3 changed · 1055 in snapshot files
sha256:2d042b6dd80a32ac1e187a9f2a23d0a68cb6178db20c5e15c8c2c1f32fcfb93d snapshot
+2
symbols added
~2
symbols modified
3
files changed
1055
files in snapshot
0
dead code introduced
Semantic Changes 4 symbols
~ src/ts/musehub.test.ts .ts 1 symbol added
+ makeEl function function makeEl L7–7
~ musehub/templates/musehub/base.html .html 1 symbol modified
~ src/ts/musehub.ts .ts 1 symbol added, 1 symbol modified
+ syncBodyClassFromContent class function syncBodyClassFromContent L172–175
Files Changed
+1 ~2
1055 in snapshot
← Older Oldest on fix/issue-168-scroll-lock
All commits
Newer → Latest on fix/issue-168-scroll-lock

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:1705df128914797fd03b93ff582e57b748b25e0e17c57359b8f1a82e7f13970e --body "your comment"