From 0f24e566bec8f4c5d1e233fe82abebb8e49ed3d4 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Mon, 26 Oct 2020 12:37:28 +0530 Subject: [PATCH] Accordion - Remove smooth scrolling It is distracting and unlike normal anchor scroll --- components/Accordion.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Accordion.jsx b/components/Accordion.jsx index 2a78543..5f187b5 100644 --- a/components/Accordion.jsx +++ b/components/Accordion.jsx @@ -27,7 +27,7 @@ const Accordion = ({ children, title = "More" }) => { } // 4. and scroll into view and focus targetElement.focus(); - targetElement.scrollIntoView({ behavior: "smooth", block: "center" }); + targetElement.scrollIntoView({ block: "center" }); if ("scrollRestoration" in history) { history.scrollRestoration = "auto"; }