feat(web): partially fix scrolling reset on search page

the scroll position is still changed, however it centers the selected item which is more usable than just the top
This commit is contained in:
Calum Dingwall 2024-07-26 17:42:48 -06:00
parent 1eed0e14f5
commit 819b92500e

View File

@ -66,7 +66,7 @@ async function navigateAssetRoute(route: AssetRoute) {
const { assetId } = route; const { assetId } = route;
const next = assetId ? currentUrlReplaceAssetId(assetId) : currentUrlWithoutAsset(); const next = assetId ? currentUrlReplaceAssetId(assetId) : currentUrlWithoutAsset();
if (next !== currentUrl()) { if (next !== currentUrl()) {
await goto(next, { replaceState: false }); await goto(next, { replaceState: false, noScroll: true });
} }
} }