diff --git a/frontend/src/features/gallery/components/ImageGallery.tsx b/frontend/src/features/gallery/components/ImageGallery.tsx index 826b67a048..d8e8a5a450 100644 --- a/frontend/src/features/gallery/components/ImageGallery.tsx +++ b/frontend/src/features/gallery/components/ImageGallery.tsx @@ -129,8 +129,11 @@ export default function ImageGallery() { galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 ) ); - setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400); - }, [dispatch]); + setTimeout( + () => shouldPinGallery && dispatch(setDoesCanvasNeedScaling(true)), + 400 + ); + }, [dispatch, shouldPinGallery]); const handleClickLoadMore = () => { dispatch(requestImages(currentCategory));