question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scroll position is not reset on page visits

See original GitHub issue

Versions:

  • @inertiajs/inertia version: 0.11.0
  • @inertiajs/inertia-vue3 version: 0.6.0

Describe the problem:

Scroll position should reset after navigation.

After updating to the latest version of Google Chrome, this is no longer the case.

Steps to reproduce:

  1. Update to the latest Chrome. The issue was observed in version 102.0.5005.63
  2. Scroll down from the top of the page
  3. Navigate using the Link component or manual visit
  4. Scroll position is kept even though preserveScroll is set to false or not set at all

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
reininkcommented, Sep 30, 2022

Hey folks, I just deployed this fix as @inertiajs/inertia@0.11.1. It was fixed in #1099.

0reactions
JackElliscommented, Sep 28, 2022

Thanks @reinink. Just running into this. Passing preserveScroll: false with an Inertia.put() and was expecting it to go up to the top (to show success message). Excited for the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scroll position won't reset when go to other page after ...
When view is changed I've store wrapper scrolltop value in the scope. When going back I applied that value one again on wrapper....
Read more >
Browser Scroll Position Does Not Reset to Top of Page after ...
Issue. When viewing a dashboard that requires a browser scroll bar to view all of the data, scrolling down and selecting an action...
Read more >
How does elm knows a new page is drawn to reset the scroll ...
The scrolling position is reset by the browser when the page is too small for the current scrolling position. This explain why some...
Read more >
scroll bar not reset on refresh - GSAP - GreenSock
scroll bar not reset on refresh ... Views: 698 ... refresh the page it refreshes, but wont scroll on top like start position...
Read more >
Scroll view - how to reset position? - AppGyver forums
Hi, how can I reset a scroll view to Y=0 position? “Scoll to” flow event does not work as it is related to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found