Rail scrollbar v2: delegated + lazy — survives app re-renders #29

Merged
Cordy merged 2 commits from rail-scrollbar-v2 into main 2026-09-06 00:28:14 +00:00
Owner

Nikola's live finding: thumb worked on docs, absent on account and staff. Diagnosed in-page: v1 attached the thumb once at load, and account.html/admin.html re-render their rail after auth, wiping it (docs never re-renders). v2 replaces the init pass with one capture-phase document scroll listener that lazily creates or reuses the thumb on whichever .railscroll is scrolling — self-healing under any re-render, and correct by construction since the thumb only needs to exist while scrolling. Same CSS; canonical snippet updated.

Nikola's live finding: thumb worked on docs, absent on account and staff. Diagnosed in-page: v1 attached the thumb once at load, and account.html/admin.html re-render their rail after auth, wiping it (docs never re-renders). v2 replaces the init pass with one capture-phase document scroll listener that lazily creates or reuses the thumb on whichever `.railscroll` is scrolling — self-healing under any re-render, and correct by construction since the thumb only needs to exist while scrolling. Same CSS; canonical snippet updated.
v1 attached the thumb once at load; account.html and admin.html re-render
their rail after auth, wiping it (docs, which never re-renders, worked -
Nikola's live finding). v2 is one capture-phase document scroll listener
that lazily creates or reuses the thumb on whichever .railscroll is
scrolling - self-healing under any re-render, no init pass needed since
the thumb only exists while scrolling.
Cordy merged commit c5202c98b3 into main 2026-09-06 00:28:14 +00:00
Cordy deleted branch rail-scrollbar-v2 2026-09-06 00:28:16 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/cairn-site#29
No description provided.