Skip to content

Scroll to top on movement wizard step change - #824

Merged
rzueger merged 1 commit into
developfrom
wizard-scroll-top
Jul 8, 2026
Merged

Scroll to top on movement wizard step change#824
rzueger merged 1 commit into
developfrom
wizard-scroll-top

Conversation

@rzueger

@rzueger rzueger commented Jul 8, 2026

Copy link
Copy Markdown
Member

Problem

Customer (LSZO) feedback: on mobile, the flight type (Private, Para Drop,
etc.) is not always visible when moving through the movement wizard —
switching to the next step keeps the previous scroll position, leaving
the flight-type field and step header (both near the top) off-screen.

Cause

Wizard steps are driven by a Redux page index, without a URL
change
. The app-level scroll-to-top (App.tsx, keyed on the route
location) therefore never fires between wizard steps. On mobile the whole
window scrolls, so the retained position carries over.

Fix

Add a useEffect in MovementWizard.tsx that calls
window.scrollTo(0, 0) whenever wizard.page changes — firing on both
Next and Back. Reuses the exact call already used in App.tsx.

Verification

  • npm run typecheck clean; full Jest suite green (2286 tests).
  • Added MovementWizard.spec.tsx tests: scrolls to top on page change,
    does not scroll on an unrelated re-render.
  • npm run build --project=lszm compiles.
  • Manual mobile check pending after deploy: scroll down on a step, tap
    Next/Back, confirm the new step opens at the top.

Wizard steps change a Redux page index without a route change, so the
app-level scroll-to-top (keyed on the location) never fired between
steps. On mobile the retained scroll position left the flight type and
step header off-screen after advancing. Reset the window scroll on each
step change.
@rzueger
rzueger merged commit eca27f1 into develop Jul 8, 2026
2 checks passed
@rzueger
rzueger deleted the wizard-scroll-top branch July 8, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant