You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect preload & cause for the root's beforeLoad' arguments when defaultPreload: "intent" #4572
With defaultPreload: "intent" set on the router, the preload & cause arguments of the root's beforeLoad are incorrect when hovering Link.
There seems to be multiple things that are wrong here:
After initial load, hovering a Link causes beforeLoad to be triggered on the root with cause: enter - even on a link going to the currently active route. This behavior is inconsistent with the behavior after clicking a link, in which cause: stay is what's reported.
preload: false is always reported for the root's beforeLoad when hovering a Link. I would expect preload: true to be reported on a hover.
Going to a nested route, and then hovering on the link to the same route reports incorrect cause: "enter", preload: false on both the parent and on the nested route.
root beforeLoad enter false (expected "stay" - or maybe "preload"?)
index beforeLoad enter false (expected "stay" - or maybe "preload"?)
root beforeLoad enter false (expected "stay" - or maybe "preload"?)
about beforeLoad preload true
Click the Home link.
Hover the Home link.
Observe that the console reports the following:
root beforeLoad stay false
index beforeLoad stay false
Reproduction for 2. above:
Hover the About link.
Observe that the console reports root beforeLoad enter false (expected preload: true)
Reproduction for 3. above:
Click the Nested link.
Hover the Nested link.
Observe that the console reports the following:
root beforeLoad stay false (expected `cause: "stay", preload: true` - or maybe `cause: "preload", preload: true`?)
bag beforeLoad enter false (expected `cause: "stay", preload: true` - or maybe `cause: "preload", preload: true`?)
nested beforeLoad enter false (expected `cause: "stay", preload: true` - or maybe `cause: "preload", preload: true`?)
I can confirm it's happening. In my case I got every cause as "enter" in beforeLoad of main app layout (just above root) after I open page by url and preload anything. After first navigation made within app its always "stay" as I should be.
Hello!
Preloading a route by hovering a link also triggers the root's beforeLoad with cause: 'enter' (instead of preload?) on my end
I would like to confirm if this indeed expected or not?
Thank you 🙂
Activity
Ridtt commentedon Aug 4, 2025
I can confirm it's happening. In my case I got every cause as "enter" in beforeLoad of main app layout (just above root) after I open page by url and preload anything. After first navigation made within app its always "stay" as I should be.
tmarnet commentedon Jan 30, 2026
Hello!
Preloading a route by hovering a link also triggers the root's
beforeLoadwithcause: 'enter'(instead ofpreload?) on my endI would like to confirm if this indeed expected or not?
Thank you 🙂
takayumi commentedon Feb 25, 2026
This issue is still relevant.
test: pin 24 community-reported issues fixed by the match-loading wor…