Open nikitaorliak-cengage opened 2 days ago
Component: Docs site - sub nav
Description: On a page with a long sub nav on the right side of the page, the Scroll Spy is behaving oddly as it tries to show where you are. This may be tied to it trying to center the current tab on the page, which shouldn't apply when you're at the top of the list.
Steps to reproduce:
Describe the bug Need to implement auto-scrolling on the first render in the documentation to the selected component (id in the path).
To Reproduce Steps to reproduce the behavior:
Component
tab;On this page
navigation;Expected behavior The page automatically scrolls to the selected component. The user sees it.
Additional context This can probably be solved as follows:
scrollIntoView
;getBoundingClientRect().top + window.scrollY
; Note that not all components may be rendered the first time, so scrolling may work unexpectedly.