OWASP / OWASP/Nest

Bug: Scroll Position Not Restored After Navigating Back from Member Profile Page

Open
#4,058 5 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
Python
Stars
451
Forks
702
Avg merge
22h 59m
Merged PRs (30d)
91

Description

**Describe the bug**

When a user scrolls down on the members listing page (https://nest.owasp.org/members) and clicks on a member profile link, they are navigated to the member's detail page (e.g. https://nest.owasp.org/members/bkimminich). Upon pressing the browser's back button, the page returns to the top instead of restoring the previous scroll position where the user left off.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to 'https://nest.owasp.org/members'
2. Scroll down the members list
3. Click on any member profile link
4. Press the browser back button
5. See error — page loads from top instead of previous scroll position

**Expected behavior**

After pressing the back button, the members page should restore the scroll position to where the user was before clicking the member profile link.

**Are you going to work on fixing this?**
- [x] Yes
- [ ] No

*(Video attached showing the scroll position loss on back navigation)*

https://github.com/user-attachments/assets/2341db3f-00c9-4d06-b41b-78e15b64660a

**Desktop (please complete the following information):**
- OS: Windows
- Browser: Brave
- Version: Latest

**Additional context**

This is a scroll restoration issue. The browser's default scroll restoration behavior appears to be overridden. Setting `history.scrollRestoration = 'auto'` or manually saving/restoring scroll position via `sessionStorage` on route change would fix this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.