Skip to content

Commit

Permalink
Scroll up too if changing author
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Mar 11, 2024
1 parent d63e6c8 commit f72ec0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/catchup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,12 @@ function Catchup() {
inline: 'center',
behavior: 'smooth',
});
} else if (authorRect.top < 0) {
authorElement.scrollIntoView({
block: 'nearest',
inline: 'nearest',
behavior: 'smooth',
});
}
}
}
Expand Down

0 comments on commit f72ec0a

Please sign in to comment.