From f72ec0aba5e2b4dee86a2edf1da25698d759342e Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 11 Mar 2024 12:21:15 +0800 Subject: [PATCH] Scroll up too if changing author --- src/pages/catchup.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index d23b422..6fb99f2 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -634,6 +634,12 @@ function Catchup() { inline: 'center', behavior: 'smooth', }); + } else if (authorRect.top < 0) { + authorElement.scrollIntoView({ + block: 'nearest', + inline: 'nearest', + behavior: 'smooth', + }); } } }