From f6f4853ab600ed07245dbc6086fd9328c8668a45 Mon Sep 17 00:00:00 2001 From: justin Date: Wed, 29 Apr 2026 01:29:32 -0500 Subject: [PATCH] Scroll to top of wizard on Next/Back step navigation Co-Authored-By: Claude Opus 4.6 (1M context) --- site/src/components/intake/Wizard.astro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/src/components/intake/Wizard.astro b/site/src/components/intake/Wizard.astro index 88ec5f9..7da4d3e 100644 --- a/site/src/components/intake/Wizard.astro +++ b/site/src/components/intake/Wizard.astro @@ -390,6 +390,9 @@ const STEP_LABELS: Record = { (document.getElementById("pw-back") as HTMLButtonElement).disabled = idx === 0; const nextBtn = document.getElementById("pw-next") as HTMLButtonElement; nextBtn.textContent = idx === steps.length - 1 ? "Finish" : "Next →"; + // Scroll to top of wizard + wizard.scrollIntoView({ behavior: "smooth", block: "start" }); + // Let the active step hydrate itself window.dispatchEvent(new CustomEvent("pw:step-shown", { detail: { step: steps[idx], idx },