Repository navigation
Commit 507aa45
Bring the full-size logo back on an upward scroll on mobile
#240 merged the mobile and desktop scroll paths into one absolute threshold,
which dropped the behaviour production has below 785px: the full-size logo
returns on any upward scroll rather than only at the top of the page. The
partner asked for production's behaviour to be kept.
Three cases could leave the logo stuck small. The handler runs once per
animation frame, so a single frame can swallow a whole flick, and recording the
turning point where the frame landed rather than at the peak it turned from made
the restore unreachable after a back-to-top jump, a hard flick up from just
below the fold, or iOS overscroll reporting a negative position. It now records
the peak, clamps the position at zero, and clears the peak on the wide path so a
rotation cannot carry a stale one.
matchMedia replaces the innerWidth read, so crossing 784px re-decides instead of
waiting for the next scroll event.
No CSS changed. The bar keeps its height at every width, so the logo row and the
menu button stay where they are.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011rCHPCdbV5C5dDJjEmMDuy1 parent 961306b commit 507aa45
3 files changed
Lines changed: 39 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments