mirror of https://github.com/mastodon/mastodon
fix: change variable name
This commit is contained in:
parent
eb343cd999
commit
6a249e9c1d
|
@ -90,7 +90,7 @@ class ScrollableList extends PureComponent {
|
|||
};
|
||||
|
||||
intersectionObserverWrapper = new IntersectionObserverWrapper();
|
||||
firstArticle = null;
|
||||
firstSeenArticle = null;
|
||||
|
||||
handleScroll = throttle(() => {
|
||||
if (this.node) {
|
||||
|
@ -260,19 +260,19 @@ class ScrollableList extends PureComponent {
|
|||
for (const article of articles) {
|
||||
const articleRect = article.getBoundingClientRect();
|
||||
if (articleRect.top > scrollableRect.top) {
|
||||
this.firstArticle = article;
|
||||
this.firstSeenArticle = article;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
returnToFirstArticle () {
|
||||
if (this.firstArticle !== null) {
|
||||
// Scroll the firstArticle back into view once we're done with everything
|
||||
// else.
|
||||
if (this.firstSeenArticle !== null) {
|
||||
// Scroll the firstSeenArticle back into view once we're done with
|
||||
// everything else.
|
||||
setTimeout(() => {
|
||||
firstArticle.scrollIntoView();
|
||||
firstArticle.querySelector("div.status__wrapper").focus();
|
||||
firstSeenArticle.scrollIntoView();
|
||||
firstSeenArticle.querySelector("div.status__wrapper").focus();
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue