We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4afe720 + d3be242 commit 45cb6e3Copy full SHA for 45cb6e3
components/product/SidebarProduct.tsx
@@ -15,8 +15,9 @@ export const SidebarProduct = () => {
15
// Setting to the top doesn't give enough context of surrounding categories
16
activeArticle?.scrollIntoView({ block: 'center' })
17
// scrollIntoView affects some articles that are very low in the sidebar
18
- // The content scrolls down a bit. This sets the article content back up top
19
- window?.scrollTo(0, 0)
+ // The content scrolls down a bit. This sets the article content back up
+ // top unless the route contains a link heading.
20
+ if (!router.asPath.includes('#')) window?.scrollTo(0, 0)
21
}, [])
22
23
if (!currentProductTree) {
0 commit comments