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.
1 parent b88126a commit 2426f61Copy full SHA for 2426f61
packages/docusaurus-theme-common/src/hooks/useHideableNavbar.ts
@@ -62,7 +62,13 @@ export function useHideableNavbar(hideOnScroll: boolean): {
62
return;
63
}
64
65
- if (locationChangeEvent.location.hash) {
+ // See https://github.com/facebook/docusaurus/pull/8059#issuecomment-1239639480
66
+ const currentHash = locationChangeEvent.location.hash;
67
+ const currentHashAnchor = currentHash
68
+ ? document.getElementById(currentHash.substring(1))
69
+ : undefined;
70
+
71
+ if (currentHashAnchor) {
72
isFocusedAnchor.current = true;
73
setIsNavbarVisible(false);
74
0 commit comments