mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-22 14:53:15 +00:00
Fix IntersectionObserver isIntersecting in Edge (#3365)
This commit is contained in:
parent
7b23f79d41
commit
24d645b7d0
|
@ -70,7 +70,9 @@ class StatusList extends ImmutablePureComponent {
|
|||
entries.forEach(entry => {
|
||||
const statusId = entry.target.getAttribute('data-id');
|
||||
|
||||
state.isIntersecting[statusId] = entry.isIntersecting;
|
||||
// Edge 15 doesn't support isIntersecting, but we can infer it from intersectionRatio
|
||||
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12156111/
|
||||
state.isIntersecting[statusId] = entry.intersectionRatio > 0;
|
||||
});
|
||||
|
||||
// isIntersecting is a map of DOM data-id's to booleans (true for
|
||||
|
|
Loading…
Reference in a new issue