fix(stage-ui): fix hash scroll on SPA navigation to providers page (#1347)

The settings layout uses a scrollable div with overflow-y-auto, not
window. useScrollToHash was scrolling window which had no effect on
SPA navigation. Point it at the actual scroll container instead.

Authored-by-agent: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Rin
2026-03-14 03:35:03 +08:00
committed by GitHub
parent 0ed21860af
commit 621d16c8bd
2 changed files with 2 additions and 1 deletions
@@ -94,7 +94,7 @@ onMounted(() => updateThemeColor())
:subtitle="routeHeaderMetadata?.subtitle"
:disable-back-button="route.path === '/settings'"
/>
<div relative min-h-0 flex-1 overflow-y-auto scrollbar-none>
<div id="settings-scroll-container" relative min-h-0 flex-1 overflow-y-auto scrollbar-none>
<RouterView />
</div>
</div>
@@ -62,6 +62,7 @@ useScrollToHash(() => route.hash, {
behavior: 'smooth', // smooth scroll animation
maxRetries: 15, // retry if target element isn't ready
retryDelay: 150, // wait between retries
scrollContainer: '#settings-scroll-container',
})
</script>