From 7fe3311921e2806a1d9516bca472af914975af26 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 30 May 2026 15:27:39 -0500 Subject: [PATCH] Fix DOT intake: wait for DOMContentLoaded before showing sections Co-Authored-By: Claude Opus 4.6 (1M context) --- site/src/components/intake/steps/DOTIntakeStep.astro | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/src/components/intake/steps/DOTIntakeStep.astro b/site/src/components/intake/steps/DOTIntakeStep.astro index 72dc1f0..de8de3e 100644 --- a/site/src/components/intake/steps/DOTIntakeStep.astro +++ b/site/src/components/intake/steps/DOTIntakeStep.astro @@ -300,8 +300,12 @@ } } - // Show sections immediately and on step-shown - showRelevantSections(); + // Show sections on DOM ready and on step-shown + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", showRelevantSections); + } else { + showRelevantSections(); + } window.addEventListener("pw:step-shown", (evt: any) => { if (evt.detail.step !== "dot-intake") return; showRelevantSections();