diff --git a/ui/v2.5/src/hooks/Lightbox/Lightbox.tsx b/ui/v2.5/src/hooks/Lightbox/Lightbox.tsx index ca79805d7..bae92ab0c 100644 --- a/ui/v2.5/src/hooks/Lightbox/Lightbox.tsx +++ b/ui/v2.5/src/hooks/Lightbox/Lightbox.tsx @@ -466,7 +466,7 @@ export const LightboxComponent: React.FC = ({ function gotoPage(imageIndex: number) { const indexInPage = (imageIndex - 1) % pageSize; if (pageCallback) { - let jumppage = Math.floor(imageIndex / pageSize) + 1; + let jumppage = Math.floor((imageIndex - 1) / pageSize) + 1; if (page !== jumppage) { pageCallback({ page: jumppage }); oldImages.current = images;