mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 16:50:47 +08:00
Revert to initial scroll position on filter change
This commit is contained in:
@@ -82,6 +82,11 @@ async function navigate(
|
||||
activeRouteStore.set(loadedRoute);
|
||||
activeUnloadedRouteStore.set(newRoute);
|
||||
isLoading.set(false);
|
||||
Array.from(
|
||||
document.getElementsByClassName("global-reset-scroll-after-navigate"),
|
||||
).forEach(el => {
|
||||
el.scrollTo(0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
export async function push(newRoute: Route): Promise<void> {
|
||||
|
||||
@@ -85,7 +85,9 @@
|
||||
<slot name="sidebar" />
|
||||
</div>
|
||||
|
||||
<div class="content" bind:this={listElement}>
|
||||
<div
|
||||
class="content global-reset-scroll-after-navigate"
|
||||
bind:this={listElement}>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user