diff --git a/src/web/lib/hakuneko/frontend@classic-dark/pages.html b/src/web/lib/hakuneko/frontend@classic-dark/pages.html index 8e403510a63..a82cc84d000 100644 --- a/src/web/lib/hakuneko/frontend@classic-dark/pages.html +++ b/src/web/lib/hakuneko/frontend@classic-dark/pages.html @@ -535,7 +535,7 @@ // Find current image within view let currentScrollImages = [...images].filter(image => { let rect = image.getBoundingClientRect(); - return (rect.top <= window.innerHeight && rect.bottom >=0); + return (rect.top <= window.innerHeight && rect.bottom >1); }); // If multiple images filtered, get the first one. If none scroll to the top image @@ -552,8 +552,7 @@ } else { // Find next image let nextScrollImage = currentScrollImage.nextElementSibling; - if (nextScrollImage) - { + if (nextScrollImage) { // Scroll to it nextScrollImage.scrollIntoView({ behavior: 'smooth' diff --git a/src/web/lib/hakuneko/frontend@classic-light/pages.html b/src/web/lib/hakuneko/frontend@classic-light/pages.html index 4ca51922e5c..67e7f7daa87 100644 --- a/src/web/lib/hakuneko/frontend@classic-light/pages.html +++ b/src/web/lib/hakuneko/frontend@classic-light/pages.html @@ -535,7 +535,7 @@ // Find current image within view let currentScrollImages = [...images].filter(image => { let rect = image.getBoundingClientRect(); - return (rect.top <= window.innerHeight && rect.bottom >=0); + return (rect.top <= window.innerHeight && rect.bottom >1); }); // If multiple images filtered, get the first one. If none scroll to the top image @@ -552,8 +552,7 @@ } else { // Find next image let nextScrollImage = currentScrollImage.nextElementSibling; - if (nextScrollImage) - { + if (nextScrollImage) { // Scroll to it nextScrollImage.scrollIntoView({ behavior: 'smooth'