ViewTransitions
causes out of order navigation when interacting with slow-to-load non-prerendered routes
#10807
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: view transitions
Related to the View Transitions feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Pages that use the
ViewTransitions
routing component can be rendered out of order during navigation, if certain pages take longer to render.I've noticed this behavior with dynamic routes that take a long time to load.
To reproduce this behavior:
Home
page, click theBlog
link. This begins the navigation to theBlog
route, which is intentionally slow and waits 10 seconds to provide a response.Blog
page is rendered, click theAbout
link. This should immediately render theAbout
page.After the wait, the
Blog
page is rendered, albeit out of order. This shouldn't have happened.What's the expected result?
The behavior should be similar to that when not using the
ViewTransitions
component.In this case, there is no out-of-order navigation.
To experience the expected behavior in the reproduction on StackBlitz:
ViewTransitions
component (say, by commenting it out).Now, the
About
page persists and there are no further route changes.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-orshkz?file=src%2Flayouts%2Froot-layout.astro
Participation
The text was updated successfully, but these errors were encountered: