From f8f0356a9f18ff0a600fc52652745f64746dcde2 Mon Sep 17 00:00:00 2001 From: thislight Date: Sat, 17 Aug 2024 19:01:05 +0800 Subject: [PATCH] Home: move to the top if the clicked tab is focus --- src/timelines/Home.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx index b177b2d..d303c72 100644 --- a/src/timelines/Home.tsx +++ b/src/timelines/Home.tsx @@ -282,6 +282,12 @@ const Home: ParentComponent = (props) => { if (items.length > idx) { items.item(idx).scrollIntoView({ block: "start", behavior: "smooth" }); } + if (isTabFocus(idx)) { + items.item(idx).scrollTo({ + top: 0, + behavior: "smooth", + }); + } }; const openFullScreenToot = (