File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
packages/docusaurus-theme-classic/src/theme Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ function Navbar(): JSX.Element {
8383 'navbar--primary' : style === 'primary' ,
8484 'navbar-sidebar--show' : sidebarShown ,
8585 [ styles . navbarHideable ] : hideOnScroll ,
86- [ styles . navbarHidden ] : ! isNavbarVisible ,
86+ [ styles . navbarHidden ] : hideOnScroll && ! isNavbarVisible ,
8787 } ) } >
8888 < div className = "navbar__inner" >
8989 < div className = "navbar__items" >
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ function SkipToContent(): JSX.Element {
3333 } ;
3434
3535 useEffect ( ( ) => {
36- programmaticFocus ( containerRef . current ) ;
36+ if ( ! location . hash ) {
37+ programmaticFocus ( containerRef . current ) ;
38+ }
3739 } , [ location . pathname ] ) ;
3840
3941 return (
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ const useHideableNavbar = (hideOnScroll: boolean): useHideableNavbarReturns => {
7575 return ;
7676 }
7777
78+ if ( ! location . hash ) {
79+ return ;
80+ }
81+
7882 isFocusedAnchor . current = true ;
7983 } , [ location . hash ] ) ;
8084
You can’t perform that action at this time.
0 commit comments