Merge pull request #13527 from drankou/drankou/techdocs-scroll-fix

fix(techdocs): Fix scrolling for anchors on the current page
This commit is contained in:
Anders Näsman
2022-09-06 11:53:33 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
@@ -184,7 +184,7 @@ export const useTechDocsReaderDom = (
navigate(`${parsedUrl.pathname}${parsedUrl.hash}`);
// Scroll to hash if it's on the current page
transformedElement
?.querySelector(`#${parsedUrl.hash.slice(1)}`)
?.querySelector(`[id="${parsedUrl.hash.slice(1)}"]`)
?.scrollIntoView();
}
} else {