-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Not scrolling to top on navigation (Firefox, scroll-behavior: smooth) #28227
Labels
Comments
Hello I can't reproduce the issue on firefox 128.0 |
Just updated to Firefox version 128.0 and I can reproduce the issue. Steps to reproduce:
Additional note: by going through navigation through router links in footer it seems that this issue is intermittent however it can be reproduced by going to index page directly and clicking on "New customer for example" or by following the steps above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Nuxt 3
Reproduction
Repository: https://github.com/JovanaMatic/nuxt-scroll-issue.git
package.json:
nuxt.config.js
Describe the bug
Reporting the same issue in Nuxt 3.
In our project we have footer element with various NuxtLinks that lead to different pages when clicking on them. When navigating through the links inside footer we experience the scrolling issue. This issue is more visible on Firefox however it is also reproducible on Chrome and Safari browser. When navigating through routes Firefox is forcefully scrolling to the bottom of the page instead of the top of the page.
We noticed that when removing scroll-behavior: smooth; property from html global class, this behaviour will slightly disappear however it can still be reproduced, user can still, by clicking on links after some time, be scrolled to the bottom of the page which is not expected. When navigating to new page, user should be scrolled to the bottom of that page.
Browser versions:
Chrome: 126.0.6478.127
Firefox: Version 127.0.2
Safari: 17.5
Node version: v20.12.2
Nuxt version: 3.12.4
Additional context
Steps to reproduce:
open the index page (eg. http://localhost:3000/) in Firefox
scroll to the bottom of the index page
click the navigation button (pointing to for example lease-end or loan-end)
on the new route, the page does not scroll to the top as expected
Logs
No response
The text was updated successfully, but these errors were encountered: