about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-07-27 23:20:48 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-27 16:20:48 +0200
commitf2233c3e25bd52388798e5d76311896fa8029413 (patch)
treead79fa0d2c7989e1b658855226cef52160159358 /app
parent73890c3cac19df3fdf7162e84024fedea5ecfe5d (diff)
Update intersection-observer to version 0.4.0 (#4398)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/components/status.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js
index 6b9fdd2af..0d7f6deb1 100644
--- a/app/javascript/mastodon/components/status.js
+++ b/app/javascript/mastodon/components/status.js
@@ -107,17 +107,12 @@ export default class Status extends ImmutablePureComponent {
       this.height = getRectFromEntry(entry).height;
     }
 
-    // Edge 15 doesn't support isIntersecting, but we can infer it
-    // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12156111/
-    // https://github.com/WICG/IntersectionObserver/issues/211
-    const isIntersecting = (typeof entry.isIntersecting === 'boolean') ?
-      entry.isIntersecting : entry.intersectionRect.height > 0;
     this.setState((prevState) => {
-      if (prevState.isIntersecting && !isIntersecting) {
+      if (prevState.isIntersecting && !entry.isIntersecting) {
         scheduleIdleTask(this.hideIfNotIntersecting);
       }
       return {
-        isIntersecting: isIntersecting,
+        isIntersecting: entry.isIntersecting,
         isHidden: false,
       };
     });