Bug: topbar.js bound click handlers to ALL .dark-toggle buttons (including the settings one, which exists at defer-time), and settings.js additionally delegated a click to the topbar button — two flips per click = no visible change.
Fix: topbar.js marks each toggle as wired (data-dark-wired); settings.js only installs its fallback handler when that marker is absent.
CSS: #settings-dark-toggle now centers horizontally under the Settings title (auto margins), aligned with .settings-body padding.
Verified: go build + go test pass; headless chromium click test flips html.dark and aria-pressed both ways at 1400x900 and 375x812; button center matches .settings-body/.settings-head h1 center; no CSP or console errors.
Fixes #197.
- Bug: topbar.js bound click handlers to ALL .dark-toggle buttons (including the settings one, which exists at defer-time), and settings.js additionally delegated a click to the topbar button — two flips per click = no visible change.
- Fix: topbar.js marks each toggle as wired (data-dark-wired); settings.js only installs its fallback handler when that marker is absent.
- CSS: #settings-dark-toggle now centers horizontally under the Settings title (auto margins), aligned with .settings-body padding.
- Verified: go build + go test pass; headless chromium click test flips html.dark and aria-pressed both ways at 1400x900 and 375x812; button center matches .settings-body/.settings-head h1 center; no CSP or console errors.
topbar.js binds click handlers to every .dark-toggle, including the
settings one; settings.js then also wired a delegation that re-clicked
the topbar button, so each click flipped dark mode twice (net no-op).
Mark buttons as wired in topbar.js and only add a fallback handler in
settings.js when topbar.js did not run.
CSS: center the toggle horizontally under the Settings title with auto
margins, matching .settings-body padding.
Closes#197
fen
merged commit 23cf3151c4 into dev2026-09-10 17:16:38 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #197.
fen referenced this pull request2026-09-10 18:07:53 +00:00