mirror of
https://github.com/janeczku/calibre-web
synced 2026-09-19 00:00:42 +00:00
Fix infinite scroll not triggering on mobile browsers
The scroll detection comparison was too strict for mobile browsers that render subpixel scroll positions. Added 5px tolerance so the infinite scroll triggers reliably on mobile devices. Refs: #3664
This commit is contained in:
@@ -414,7 +414,7 @@ $(function() {
|
||||
$(".col-sm-10").bind("scroll", function () {
|
||||
if (
|
||||
$(this).scrollTop() + $(this).innerHeight() >=
|
||||
$(this)[0].scrollHeight
|
||||
$(this)[0].scrollHeight - 5
|
||||
) {
|
||||
$loadMore.infiniteScroll("loadNextPage");
|
||||
window.history.replaceState({}, null, $loadMore.infiniteScroll("getAbsolutePath"));
|
||||
|
||||
Reference in New Issue
Block a user