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
I've encountered this same behaviour. In my testing, It seems like the beforeLoad just doesn't run after the actual click if it has been preloaded from a hover and you haven't unhovered and then rehovered.
I think when you unhover and then hover again, because it's already preloaded, the hover doesn't trigger the beforeLoad again and therefore clicking works, but if the hover did trigger the preload and you click it without leaving the hover state, it never runs.
I'll likely be investigating this issue further next week so I'll update this post if I find any further information about what causes the issue.
Activity
schiller-manuel commentedon Jun 15, 2024
I cannot reproduce this, maybe I am too slow :D
can you please create a video?
nucleartux commentedon Jun 15, 2024
https://drive.google.com/file/d/1XcXgCSMdGj4KtGS0SAVlp86ZdDQSosIj/view?usp=sharing
(I was unable to upload the video to GitHub due to size restrictions. Sorry.)
You can fast forward the parts of the video where I wait for pages to load, by the way.
schiller-manuel commentedon Jun 15, 2024
is there any way this can be made easier reproducible? do those timeouts affect the behavior ?
nucleartux commentedon Jun 15, 2024
Actually, reproduction is much easier than it seemed.
Untitled3.mov
If I set
defaultPreloadto false, everything works as expected.ViewableGravy commentedon Jul 4, 2024
I've encountered this same behaviour. In my testing, It seems like the beforeLoad just doesn't run after the actual click if it has been preloaded from a hover and you haven't unhovered and then rehovered.
I think when you unhover and then hover again, because it's already preloaded, the hover doesn't trigger the beforeLoad again and therefore clicking works, but if the hover did trigger the preload and you click it without leaving the hover state, it never runs.
I'll likely be investigating this issue further next week so I'll update this post if I find any further information about what causes the issue.
schiller-manuel commentedon Jul 6, 2024
this will be fixed by #1907
reproducer with pre-release package: https://stackblitz.com/edit/tanstack-router-v9onbn?file=src%2Froutes%2F_auth.tsx