Svelte reset sidebar scroll to top when content changes

Hi, have a svelte spa gallery site - repl here. Have a couple of category buttons - Oil on Canvas and WaterColor… Sidebar contains all images in category. When category changes the sidebar content changes accordingly, problem is the scroll position (of sidebar) doesn’t reset to top - first image,
How can I fix this? Any help greatly appreciated.

1 Like

Corresponding tweet for this thread:

Share link for this tweet.