Skip to content

Commit

Permalink
Use sidebarTransitionTime for timing
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyEJohnson committed Jan 18, 2024
1 parent e5a1f21 commit 3b71825
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/content/components/TableOfContents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { archiveTreeContainsNode, getArchiveTreeSectionType } from '../../utils/
import { expandCurrentChapter, scrollSidebarSectionIntoView, setSidebarHeight } from '../../utils/domUtils';
import { stripIdVersion } from '../../utils/idUtils';
import { CloseToCAndMobileMenuButton, TOCBackButton, TOCCloseButton } from '../SidebarControl';
import { sidebarTransitionTime } from '../constants';
import { Header, HeaderText, SidebarPaneBody } from '../SidebarPane';
import { LeftArrow, TimesIcon } from '../Toolbar/styled';
import * as Styled from './styled';
Expand Down Expand Up @@ -67,7 +68,7 @@ const SidebarBody = React.forwardRef<
'ol > li a, old > li summary'
) as HTMLElement;

setTimeout(() => firstItemInToc?.focus(), 100);
setTimeout(() => firstItemInToc?.focus(), sidebarTransitionTime);
}
},
[props.isTocOpen, mRef]
Expand Down

0 comments on commit 3b71825

Please sign in to comment.