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:
@@ -434,6 +434,7 @@ const BaseReaderViewer = forwardRef(
|
||||
onSizeChange={onChapterViewSizeChange}
|
||||
minWidth={isChapterSizeSourceChapter ? 0 : minChapterViewWidth}
|
||||
minHeight={isChapterSizeSourceChapter ? 0 : minChapterViewHeight}
|
||||
scrollElement={scrollElementRef.current}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user