From f39eccdd31cbf15e8aa7650830e47ad8bf511f92 Mon Sep 17 00:00:00 2001 From: zurdi Date: Mon, 31 Jul 2023 17:32:53 +0200 Subject: [PATCH] grid scroll fixed for smartphone --- frontend/src/views/Gallery.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Gallery.vue b/frontend/src/views/Gallery.vue index 1e86e1ba7..cfe021454 100644 --- a/frontend/src/views/Gallery.vue +++ b/frontend/src/views/Gallery.vue @@ -129,9 +129,10 @@ function onGridScroll() { if (cursor.value === null && searchCursor.value === null) return; const { scrollTop, scrollHeight, clientHeight } = document.documentElement; + const scrollOffset = 60; - // If we are at the bottom of the page, fetch more roms - if (scrollTop + clientHeight >= scrollHeight) { + // If we are close at the bottom of the page, fetch more roms + if (scrollTop + clientHeight + scrollOffset >= scrollHeight) { galleryFilter.value ? fetchMoreSearch() : fetchMoreRoms(route.params.platform);