Avoid force-scrolling the minimap when unneeded

pull/9508/head^2
Thibaud Colas 2022-10-31 12:33:43 +00:00
rodzic 3e2cbea51a
commit b7c04ed960
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -45,7 +45,8 @@ const updateScrollPosition = (list: HTMLOListElement) => {
'a[aria-current="true"]',
);
if (activeLinks.length === 0) {
// Dont update the scroll position if there are no links, or all links are visible.
if (activeLinks.length === 0 || list.scrollHeight === list.clientHeight) {
return;
}