diff options
author | Nolan Lawson <nolan@nolanlawson.com> | 2017-05-28 07:45:42 -0700 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-28 16:45:42 +0200 |
commit | 24d645b7d00c4e47264b9a2efb71abfb840de28d (patch) | |
tree | 0f18274f1e51eccd69cd1d462724c2f678b76ea8 | |
parent | 7b23f79d41b025fc636a1475b75bf3d3d5f1edf6 (diff) |
Fix IntersectionObserver isIntersecting in Edge (#3365)
-rw-r--r-- | app/javascript/mastodon/components/status_list.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/status_list.js b/app/javascript/mastodon/components/status_list.js index 59089ad92..39f663dfb 100644 --- a/app/javascript/mastodon/components/status_list.js +++ b/app/javascript/mastodon/components/status_list.js @@ -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 |