fix scrolling to position.
This commit is contained in:
@@ -134,7 +134,8 @@ export default function CollectionReadingView({
|
||||
// Wait for images to load before scrolling so scrollHeight is accurate
|
||||
const waitForImagesAndScroll = () => {
|
||||
if (!contentRef.current) {
|
||||
setTimeout(performScroll, 500);
|
||||
// Content not in DOM yet — retry until the ref is available.
|
||||
if (!cancelled) setTimeout(waitForImagesAndScroll, 100);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user