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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user