diff --git a/CHANGELOG.md b/CHANGELOG.md index bf35f787..9203d167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Reader**) Fix jumping back to the first page on window resize - (**Reader**) Fix chapter not getting marked as read in continuous reading mode in case the last page is not big enough to get marked as the current page - (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled +- (**Reader**) Fix infinite scrolling with disabled transition page ## [20260509.01] (r3147) - 2026-05-09 diff --git a/src/features/reader/infinite-scroll/useReaderInfiniteScrollUpdateChapter.ts b/src/features/reader/infinite-scroll/useReaderInfiniteScrollUpdateChapter.ts index 94c80bf0..70af0656 100644 --- a/src/features/reader/infinite-scroll/useReaderInfiniteScrollUpdateChapter.ts +++ b/src/features/reader/infinite-scroll/useReaderInfiniteScrollUpdateChapter.ts @@ -272,10 +272,12 @@ export const useReaderInfiniteScrollUpdateChapter = ( const onScroll = () => { const isAtStartX = scrollElement.scrollLeft === 0; - const isAtEndX = scrollElement.scrollLeft === scrollElement.scrollWidth - scrollElement.clientWidth; + const isAtEndX = + Math.ceil(scrollElement.scrollLeft) === scrollElement.scrollWidth - scrollElement.clientWidth; const isAtStartY = scrollElement.scrollTop === 0; - const isAtEndY = scrollElement.scrollTop === scrollElement.scrollHeight - scrollElement.clientHeight; + const isAtEndY = + Math.ceil(scrollElement.scrollTop) === scrollElement.scrollHeight - scrollElement.clientHeight; const isAtStart = isContinuousVerticalReadingModeActive ? isAtStartY : isAtStartX; const isAtEnd = isContinuousVerticalReadingModeActive ? isAtEndY : isAtEndX; @@ -306,7 +308,6 @@ export const useReaderInfiniteScrollUpdateChapter = ( useCallback( (entries) => { if ( - // !shouldShowTransitionPage || !shouldUseInfiniteScroll || !isContinuousReadingMode(readingMode) || chapterToOpenId === undefined