From 60b19622c0f80b2b2f3a56ce2e9377f1609477d0 Mon Sep 17 00:00:00 2001 From: Your Autistic Life Date: Wed, 8 Nov 2023 09:12:24 -0500 Subject: [PATCH] fix: do not skip LoadGap elements --- app/javascript/mastodon/components/status_list.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/javascript/mastodon/components/status_list.jsx b/app/javascript/mastodon/components/status_list.jsx index 1e3518740e..cadac9e73d 100644 --- a/app/javascript/mastodon/components/status_list.jsx +++ b/app/javascript/mastodon/components/status_list.jsx @@ -77,6 +77,14 @@ export default class StatusList extends ImmutablePureComponent { return; } element = article.querySelector(".focusable"); + + // This happens when the article contains a LoadGap element. We just want + // to stop the navigation there so that the user does not erroneously skip + // over it. + if (element === null && + article.querySelector(".load-more.load-gap") !== null) { + return; + } } if (align_top && container.scrollTop > element.offsetTop) {