router icon indicating copy to clipboard operation
router copied to clipboard

Hovering over a link in a NotFoundComponent with preloadintent and no staletime

Open jmdeschenes opened this issue 1 year ago • 1 comments

Describe the bug

When in a notFoundComponent, a <Link to='...'> will automatically load the page. Interestingly, if you use a button with a onClick: () => navigate('/')... Nothing happens

Your Example Website or App

https://stackblitz.com/edit/github-h4dx75?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Clink on the Invalid Link Button or enter an invalid link in the URL.
  2. Hover over the go back button
  3. The screen goes blank

If you comment either:

  1. defaultPreload: 'intent' or defaultPreloadStaleTime: 0, it works as expected. As a workaround you can set the link: <Link to='/' preload={false}>...</Link> and it should work as expected.

Expected behavior

As a user, I would expect that I can navigate when I click on a link.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Chrome
  • Version: 121.0.6167.160

Additional context

No response

jmdeschenes avatar Feb 24 '24 15:02 jmdeschenes

I’m working on this issue right now.

tannerlinsley avatar Feb 24 '24 15:02 tannerlinsley

I believe this is related to/a dupe of 1201. Any progress on your work, @tannerlinsley ?

pontusdacke avatar Mar 13 '24 09:03 pontusdacke

should be fixed, please open a new issue if this is still relevant

schiller-manuel avatar Mar 27 '24 17:03 schiller-manuel