From a1e267a3b39c11c501b8e1e2b6ee53b874338c83 Mon Sep 17 00:00:00 2001 From: valere Date: Tue, 8 Oct 2024 16:39:56 +0200 Subject: [PATCH] FIX: mobile inifinite scroll (needs 1px offset) --- composables/useScrollEnd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/useScrollEnd.ts b/composables/useScrollEnd.ts index bcc965a..3b88ae5 100644 --- a/composables/useScrollEnd.ts +++ b/composables/useScrollEnd.ts @@ -4,7 +4,7 @@ export function useScrollEnd() { const handleScroll = () => { const scrollPosition = window.innerHeight + window.scrollY - const pageHeight = document.documentElement.offsetHeight + const pageHeight = document.documentElement.offsetHeight - 1 // 1 pixel offset to fix mobile browser if (scrollPosition >= pageHeight && typeof callback === 'function') { callback()