From 2810bd3f3d910281e73b72f8d48329567c1f128a Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 28 May 2017 07:45:42 -0700 Subject: [PATCH] Fix IntersectionObserver isIntersecting in Edge (#3365) --- app/javascript/mastodon/components/status_list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/status_list.js b/app/javascript/mastodon/components/status_list.js index 59089ad925..39f663dfb3 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