Fix leading page scroll preservation in continuous horizontal mode with RTL mode

This commit is contained in:
schroda
2026-04-13 16:10:46 +02:00
parent 6131b99169
commit ea31889969
2 changed files with 2 additions and 1 deletions

View File

@@ -208,7 +208,7 @@ const usePreserveOnLeadingPageRender = (scrollElementRef: RefObject<HTMLElement
return entry.target.offsetTop < top;
}
return Math.abs(entry.target.offsetLeft) < Math.abs(left);
return entry.target.offsetLeft < left;
});
const includesElementsBeforeScrollPosition = !!entriesBeforeScrollPosition.length;