From 8e669720bd895a2ab5090514d0d6b26a453112ae Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Sat, 11 Mar 2023 00:31:33 -0800 Subject: [PATCH] don't smooth scroll image hashes on gallery --- src/pages/photogallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/photogallery.tsx b/src/pages/photogallery.tsx index 8bd0a4f..e0516fb 100644 --- a/src/pages/photogallery.tsx +++ b/src/pages/photogallery.tsx @@ -121,7 +121,7 @@ const GalleryPage = ({ console.log("scrolling into view manually", el.offsetTop); el.scrollIntoView({ block: hash.startsWith("all") ? "start" : "center", - behavior: "smooth", + behavior: hash.startsWith("all") ? "smooth" : "auto", }); setTimeout(() => { window.addEventListener("scroll", removeHash);