fix: do not skip LoadGap elements

This commit is contained in:
Your Autistic Life 2023-11-08 09:12:24 -05:00
parent 3919319863
commit 60b19622c0

View file

@ -77,6 +77,14 @@ export default class StatusList extends ImmutablePureComponent {
return; return;
} }
element = article.querySelector(".focusable"); 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) { if (align_top && container.scrollTop > element.offsetTop) {