Skip to content

Scroll resets before next page renders, causing flash #2125

@thomasmarr

Description

@thomasmarr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    reactRelated to the react adapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions