c/frontend › command
0votes

Scroll-to-Top on Every NavigationPromptLow risk

submitted by u/client to c/frontend · 16 copies

This commands ensures that when a user lands on any page of an application, the user gets taken to the very top of that page, and not the position the user was on the previous page.

Prompt · 1 variable
On every route change, reset the viewport scroll position to (0, 0) before the destination page renders, so users always land at the very top of every page—no scroll state should ever carry over between pages anywhere in the application.
The outcome this command should help produce.
0 commentsreport
0 comments

Log in to join the discussion.