router icon indicating copy to clipboard operation
router copied to clipboard

Active Link css transition flickering

Open idonotknowwhoiam opened this issue 1 month ago • 2 comments

Which project does this relate to?

Router

Describe the bug

When styling the active link with a color transition, the previously active link is occasionally styled incorrectly. It briefly flickers with the previous colors for less than a second. This happens rarely (maybe 1 in 30 navigations). I’m not sure whether the bug is caused by the tanstack router or by CSS itself.

Your Example Website or App

https://github.com/idonotknowwhoiam/tanstackrouter-repro

Steps to Reproduce the Bug or Issue

  1. Clone the repository.
  2. Start the server (dev/preview).
  3. Navigate between pages, occasionally refreshing the browser (this may or may not influence the issue idk).

Expected behavior

The active link should switch styles without any flickering.

Screenshots or Videos

https://github.com/user-attachments/assets/f503d530-4646-41ba-a5c4-18850d70a4f7

Platform

  • Router / Start Version: 1.139.12
  • OS: macOS
  • Browser: Chrome, Arc
  • Browser Version: 142.0.7444.177
  • Bundler: Vite
  • Bundler Version: 7.1.7

Additional context

No response

idonotknowwhoiam avatar Dec 08 '25 02:12 idonotknowwhoiam

i cannot reproduce this neither in chrome nor on firefox

schiller-manuel avatar Dec 10 '25 00:12 schiller-manuel

I also can’t reproduce this in Firefox, but in Chrome (clean profile, no extensions) it happens sometimes. I’ve updated the repo with more navigation routes, so it occurs more often now.

https://github.com/user-attachments/assets/a876db27-7a79-4e86-987d-e4925b8a8974

idonotknowwhoiam avatar Dec 10 '25 00:12 idonotknowwhoiam