Skip to content

Commit 3175365

Browse files
panaromumonaca
authored andcommitted
Revert "Revert "refactor IntersectionObserver to observe viewport in single-column mode (mastodon#12735)""
This reverts commit 99ac41f.
1 parent 5fb7574 commit 3175365

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/javascript/mastodon/components/scrollable_list.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,13 @@ export default class ScrollableList extends PureComponent {
212212
}
213213

214214
attachIntersectionObserver () {
215-
this.intersectionObserverWrapper.connect({
215+
let nodeOptions = {
216216
root: this.node,
217217
rootMargin: '300% 0px',
218-
});
218+
};
219+
220+
this.intersectionObserverWrapper
221+
.connect(this.props.bindToDocument ? {} : nodeOptions);
219222
}
220223

221224
detachIntersectionObserver () {

0 commit comments

Comments
 (0)