Luson045/medi-connect

[Bug]: Navbar does not reset scroll position when navigating between pages

Closed this issue · 2 comments

Description: When navigating between pages using the navbar, the scroll position from the previous page is retained. For example, if a user scrolls to the bottom of one page and then navigates to a different page, the new page also opens at the bottom, rather than resetting to the top.

Expected Behavior: When navigating to a new page, the scroll position should reset to the top of the page.

Actual Behavior: The new page retains the scroll position from the previous page.

Possible Fix: Ensure the scroll position is reset to the top when navigating to a new page, possibly by adding a window.scrollTo(0, 0) in the page navigation logic.

@Luson045 please assign it to me