Fix scroll jump on chapter resume with continuous horizontal mode

This commit is contained in:
schroda
2026-04-13 18:16:12 +02:00
parent 9595076dae
commit 323222d0f2
2 changed files with 4 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Reader**) Fix opening the previous/next chapter in the continuous horizontal mode with inverted reading direction
- (**Reader**) Fix scroll preservation in continuous horizontal mode with righ to left reading direction
- (**Reader**) Fix mobile progress bar previous/next button not being clickable in single page chapters
- (**Reader**) Fix scroll position jumping on chapter resume in the continuous horizontal mode
- (**Manga**) Fix dynamic manga page color theme not getting reset after leaving the manga page
## [20251230.01] (r2937) - 2025-12-30

View File

@@ -282,10 +282,12 @@ const usePreserveOnInfiniteScrollPreviousChapterInitialRender = (
visibleChapters,
);
const doesPreviousChapterExist = currentChapterIndex > 0;
const isRenderOfPreviousChapter = currentPageIndex === 0;
// only relevant when prepending content to the dom due to the resulting layout shift
const isFirstRenderOfPreviousChapter = !previousNextChapterVisibility.previous && isRenderOfPreviousChapter;
const isFirstRenderOfPreviousChapter =
doesPreviousChapterExist && !previousNextChapterVisibility.previous && isRenderOfPreviousChapter;
if (!isFirstRenderOfPreviousChapter) {
return false;
}