inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.55k stars 435 forks source link

[2.x] Prefetch on the current page causes re-render and focus loss #2066

Open Jussi-Mannisto opened 1 month ago

Jussi-Mannisto commented 1 month ago

Version:

Describe the problem:

Prefetching the current page triggers a full re-render, causing focus to be lost.

https://github.com/user-attachments/assets/225aea36-0e17-4dde-a8c5-2d6c30bd779a

This occurs with both the prefetch attribute and programmatic prefetching.

Steps to reproduce:

  1. Create a dropdown navigation containing links with the prefetch attribute.
  2. When the cache entry for the active page is stale, hover on its link.
Dracula707 commented 2 days ago

vue 3 too.