Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll resets before next page renders, causing flash #2125

Open
thomasmarr opened this issue Dec 9, 2024 · 1 comment
Open

Scroll resets before next page renders, causing flash #2125

thomasmarr opened this issue Dec 9, 2024 · 1 comment
Labels
react Related to the react adapter

Comments

@thomasmarr
Copy link

Version:

  • @inertiajs/react version: 2.0.0-beta-3 and 1.0.0

Describe the problem:

When navigating from one page to another, just before the next page appears, the initial page scroll resets to the top of the page. This causes a janky flash just before the next page renders.

This is already described in issue #1802 but that issue is closed as fixed, and I am unsure whether my comment there has been noticed, so I am opening a new issue.

Steps to reproduce:

This is described in #1802 :

Create a page that causes the browser viewport to scroll
Include a link to another page
Click that link while scrolled down, and observe a flash of scroll-to-top before the transition

@thomasmarr thomasmarr added the react Related to the react adapter label Dec 9, 2024
@LucaRed
Copy link
Contributor

LucaRed commented Dec 18, 2024

This bug is about the React adapter, but the Vue one has a similar problem, in which the page jumps to the top before a page transition (e.g. when using a persistent layout with a <Transition> element that wraps the main <slot />).

I wonder if I should open a separate bug for this 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react Related to the react adapter
Projects
None yet
Development

No branches or pull requests

2 participants