smooth scrolling when scrolling back to item from modal

This commit is contained in:
Vyacheslav Matyukhin 2022-07-26 21:55:59 +04:00
parent 8be3f91d8e
commit e3e9c76af2
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -131,6 +131,7 @@ export const ItemSettingsMenu: React.FC<Props> = (props) => {
if (!ref.current) return; if (!ref.current) return;
window.scroll({ window.scroll({
top: ref.current.getBoundingClientRect().y + window.scrollY, top: ref.current.getBoundingClientRect().y + window.scrollY,
behavior: "smooth",
}); });
}; };