Use "ReaderChapterViewer" as "root" for "IntersectionObserver" for "infinite scroll"

Using the actual "document element" as the "intersection observer root" causes issues in case the available reader width is less than the viewport.
In these cases sometimes the previous/next chapter never loaded because the necessary intersection never fired.
This commit is contained in:
schroda
2025-04-03 22:30:35 +02:00
parent 0f49115b23
commit e1895b21e3
4 changed files with 10 additions and 0 deletions

View File

@@ -434,6 +434,7 @@ const BaseReaderViewer = forwardRef(
onSizeChange={onChapterViewSizeChange}
minWidth={isChapterSizeSourceChapter ? 0 : minChapterViewWidth}
minHeight={isChapterSizeSourceChapter ? 0 : minChapterViewHeight}
scrollElement={scrollElementRef.current}
/>
);
})}