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.

different default scrollBehavior that resets page scroll on navigation

See original GitHub issue

Environment

- Operating System: `Darwin`
- Node Version:     `v17.3.1`
- Nuxt Version:     `3.0.0-27369360.33ebb01`
- Package Manager:  `yarn@1.22.17`
- Bundler:          `Vite`
- User Config:      `vite`, `ssr`
- Runtime Modules:  `-`
- Build Modules:    `-`

Reproduction

No reproduction needed imo

Describe the bug

When navigating using a <NuxtLink to="/othePage" /> the page scroll is not resetting. In other words, the page does not scrollToTop on route change

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
fanckushcommented, Jan 20, 2022

@K-Honkawa thanks! i’ll try that but the default behaviour should be to reset the scroll so i’ll keep this open as a bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs ...
Read more >
Scroll Behavior | Vue Router
The scrollBehavior function receives the to and from route objects, like Navigation Guards. The third argument, savedPosition , is only available if this...
Read more >
scroll-behavior - CSS-Tricks
The scroll-behavior property in CSS allows us to define whether the scroll location of the browser jumps to a new location or smoothly ......
Read more >
How to change scroll behavior while going back in next js?
I included scroll={false} in Link but it doesn't work . How can I prevent scroll resetting when user clicks back from the post...
Read more >
Changing Scroll Behavior with Vue Router | by John Au-Yeung
In this article, we'll look at how to change the scroll behavior of Vue Router ... to scroll the next page back 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