Scroll down ~30px, wait 0.5s → LOCKED. Then tap the URL bar so it expands back.
The page must drop to INITIAL and glide back to the top — no jump, no flash.
The third HUD button cycles smooth / instant / keep if you want to compare.
Block 1
What the fix does:
viewportH() reads only visualViewport.height — never documentElement.clientHeight, which the old code was writing to itself.peak = tallest viewport seen. The URL bar collapsing raises it.≥20px below peak, held for 180ms, means the bar came back → full reset.lock() attached. The old softReset() leaked them.app.scrollTop over to window.scrollY in the same frame it unlocks, then eases to 0 over 260–700ms. Without the handover you would see a jump first and the animation after.Block 2 — scroll deeper, then tap the URL bar from here.
Expected: the HUD logs shrink Npx — confirming… then RESET ← URL bar back · smooth Nms from Y, and the page eases back to the top, unlocked and re-armable. Watch winY in the HUD count down instead of snapping.
Block 3 — rotate the phone here.
Orientation change also resets to the initial state. No landscape overlay on this page on purpose, so it stays testable on desktop too.
Block 4 — the lock/reset counters in the HUD should stay balanced.
If resets climbs on its own without you touching the URL bar, the shrink threshold is too tight — tell me and I will raise it.
Block 5 — bottom. Nothing should be hidden under the URL bar here.