kopia lustrzana https://github.com/wagtail/wagtail
Avoid force-scrolling the minimap when unneeded
rodzic
3e2cbea51a
commit
b7c04ed960
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue