Skip to content

Commit

Permalink
(#865) Lower the intersectionObserver threshold to 50%
Browse files Browse the repository at this point in the history
Progress tracking doesn't trigger in infinite scroll when pages are too tall AND when you are using the mousewheel or similar. This happens because the IntersectionObserver threshold is set to 0.8, and is thus never triggered if 80% of a page is never visible at one time.
  • Loading branch information
Difegue committed Dec 16, 2023
1 parent f52b990 commit 26ff17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Reader.initInfiniteScrollView = function () {
Reader.updateProgress();
}
}
}, { threshold: 0.8 });
}, { threshold: 0.5 });

Reader.pages.slice(1).forEach((source) => {
const img = new Image();
Expand Down

0 comments on commit 26ff17a

Please sign in to comment.