diff --git a/client/src/components/Minimap/Minimap.tsx b/client/src/components/Minimap/Minimap.tsx index 65eb26f4fe..2732327c03 100644 --- a/client/src/components/Minimap/Minimap.tsx +++ b/client/src/components/Minimap/Minimap.tsx @@ -45,7 +45,8 @@ const updateScrollPosition = (list: HTMLOListElement) => { 'a[aria-current="true"]', ); - if (activeLinks.length === 0) { + // Don’t update the scroll position if there are no links, or all links are visible. + if (activeLinks.length === 0 || list.scrollHeight === list.clientHeight) { return; }