itsnitinr / vscode-portfolio

A VSCode themed developer portfolio built using Next.js

Home Page:https://vscode-portfolio.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reset scroll to top after navigating to different page

thesohailjafri opened this issue · comments

Describe the bug
Recently I cloned your repo to create my portfolio site and I added a page of my past experience and a few more projects which added a scroll to it and experience page also had the scroll, but when I scroll on the experience page and go to the projects page scroll remained at the same position where it was on the experience page which creates an issue in user experience and It might feel like a bug to a potential visitor.

This will also happen if you scroll down in the gitHub page and go to the projects page

To Reproduce
Steps to reproduce the behavior:

  1. Go to github page
  2. Scroll down to the bottom
  3. Go to projects page

Expected behavior
Scroll position should make it back to the top on URL/pathname change

Screenshots
Demo:
Screencast from 09-08-23 01:57:36 AM IST.webm

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser

chrome

Smartphone (please complete the following information):

  • Device: Moto G40 - OS: Andriod
  • Browser chrome

Please assign this issue to me, I already have solved this problem

Thanks for your interest :)

Resolved the issue and added the pull request

This issue is resolved and merged