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 can see the default behaviour in SvelteKit is to scroll to the top of the page when navigating, which is great. But when implementing a transition, it seems to do this immediately on both the to AND from pages. Is there any way to avoid this and only the scroll to zero on the destination page ? The way I apply page transition is by tracking the url.pathname and apply a fade transition inside a {#key ... } block, which works well apart from this detail.
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
-
Hello,
I can see the default behaviour in SvelteKit is to scroll to the top of the page when navigating, which is great. But when implementing a transition, it seems to do this immediately on both the
to
ANDfrom
pages. Is there any way to avoid this and only the scroll to zero on the destination page ? The way I apply page transition is by tracking theurl.pathname
and apply a fade transition inside a{#key ... }
block, which works well apart from this detail.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions