From be5e8bad17f415116c43f7d7074783aa5b9f36dc Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Tue, 11 Mar 2025 14:47:15 +0800 Subject: [PATCH] Revert "Enhance infinite scroll functionality; increase sentinel height and ensure full width, trigger layout recalculation on initialization." This reverts commit a1e9e440edd5f0a2037f613c94a35e095656e3c9. --- static/js/utils/infiniteScroll.js | 11 ++--------- templates/loras.html | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/static/js/utils/infiniteScroll.js b/static/js/utils/infiniteScroll.js index c0c566a5..448ede8d 100644 --- a/static/js/utils/infiniteScroll.js +++ b/static/js/utils/infiniteScroll.js @@ -22,15 +22,8 @@ export function initializeInfiniteScroll() { } else { const sentinel = document.createElement('div'); sentinel.id = 'scroll-sentinel'; - sentinel.style.height = '20px'; // Increase height a bit - sentinel.style.width = '100%'; // Ensure full width - sentinel.style.position = 'relative'; // Ensure it's in the normal flow + sentinel.style.height = '10px'; document.getElementById('loraGrid').appendChild(sentinel); state.observer.observe(sentinel); } - - // Force layout recalculation - setTimeout(() => { - window.dispatchEvent(new Event('resize')); - }, 100); -} \ No newline at end of file +} \ No newline at end of file diff --git a/templates/loras.html b/templates/loras.html index 97edfeca..6ac83c36 100644 --- a/templates/loras.html +++ b/templates/loras.html @@ -85,7 +85,7 @@ {% else %} {% include 'components/controls.html' %} -