From e3e9c76af2471db9e1abe2e1c326b95ddb7565e8 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Tue, 26 Jul 2022 21:55:59 +0400 Subject: [PATCH] smooth scrolling when scrolling back to item from modal --- .../src/components/SquiggleViewer/ItemSettingsMenu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx b/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx index c4c226d8..2c26b9aa 100644 --- a/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx +++ b/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx @@ -131,6 +131,7 @@ export const ItemSettingsMenu: React.FC = (props) => { if (!ref.current) return; window.scroll({ top: ref.current.getBoundingClientRect().y + window.scrollY, + behavior: "smooth", }); };