You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to scroll to top while navigating to a new route, as explained in the doc.
In my project, the overflow is not managed on my app div, but on a child one. Unfortunately, this seems to break the behaviour described in the doc.
I've seen a workaround which gets the concerned div with getElementById and force its scroll position with scrollTop within the scrollBehavior() function but it doesn't seem to be a clean solution.
Do you guys have any idea about how to do this properly?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
I've been trying to scroll to top while navigating to a new route, as explained in the doc.
In my project, the overflow is not managed on my app div, but on a child one. Unfortunately, this seems to break the behaviour described in the doc.
I've seen a workaround which gets the concerned div with
getElementById
and force its scroll position withscrollTop
within the scrollBehavior() function but it doesn't seem to be a clean solution.Do you guys have any idea about how to do this properly?
Beta Was this translation helpful? Give feedback.
All reactions