Fix unwanted scroll-to-top on link hover in search results#306
Merged
geoff-maddock merged 2 commits intomainfrom Nov 21, 2025
Merged
Fix unwanted scroll-to-top on link hover in search results#306geoff-maddock merged 2 commits intomainfrom
geoff-maddock merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Changed router scroll behavior from onResolved to onBeforeNavigate to only trigger scroll on actual navigation, not on hover intent preloads. Added test to validate fix. Co-authored-by: geoff-maddock <55493+geoff-maddock@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bug on search results page when hovering over location entity
Fix unwanted scroll-to-top on link hover in search results
Nov 21, 2025
📦 Build Size Report |
✅ PR Checks CompleteTests Status: success All tests in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hovering over entity links in location cards triggers scroll-to-top due to router preload events being treated as navigation.
Changes
src/routes/root.tsx: Subscribe toonBeforeNavigateinstead ofonResolvedfor scroll behavioronResolvedfires on both navigation and preload (hover withdefaultPreload: 'intent')onBeforeNavigatefires only on actual navigationsrc/__tests__/routes/root-scroll-behavior.test.tsx: Add test verifying preload doesn't trigger scrollScreenshot
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
test.api/usr/local/bin/node /usr/local/bin/node --conditions node --conditions development /home/REDACTED/work/arcane-city-frontend/arcane-city-frontend/node_modules/tinypool/dist/entry/process.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.