chore: give scroll and focus their own state and tests - #16983
chore: give scroll and focus their own state and tests#16983Nic-Polumeyv wants to merge 1 commit into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/b75501c942eed30d2fea877c85f2855230e4cd56Open in |
🦋 Changeset detectedLatest commit: b75501c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8081c8a to
889a452
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (7)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe navigation runtime now restores scroll independently from focus. Merge Risk: ⚪ Minimal · up to Navigation now restores scrolling independently from focus, avoids unnecessary scrolling when focus is retained, and clears focus from SVG elements before updates. No current merge-blocking risk is evident. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
packages/kit/src/runtime/client/client.jsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. packages/kit/src/runtime/client/focus.jsESLint skipped: the matched ESLint configuration already failed (missing-dependency). packages/kit/src/runtime/client/focus.spec.jsESLint skipped: the matched ESLint configuration already failed (missing-dependency).
Comment |
889a452 to
b75501c
Compare
On top of #16980:
scroll.jsowns the after-navigation scroll andfocus.jsowns the blur and the focus reset, withfinish_navigationthe one place that sequences them. Whether the app moved focus during the update is now read fromdocument.activeElementdirectly instead of a snapshot taken before the update, and a navigation that does not reset no longer scrolls to where it already is.A focused SVG element is now blurred before the DOM update like any HTML element.