about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/scrollable_list.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-21 09:12:13 +0200
committerGitHub <noreply@github.com>2019-09-21 09:12:13 +0200
commitba0de8fb68f5e67312446d1ac351f06d093fc2b8 (patch)
tree1b7ba14373d38b49275887e5b613086e5cb5a14f /app/javascript/mastodon/components/scrollable_list.js
parenta90243a712ac17708de898e302e337de05b7699d (diff)
Fix updates being hidden behind pending items on unmounted components (#11898)
Diffstat (limited to 'app/javascript/mastodon/components/scrollable_list.js')
-rw-r--r--app/javascript/mastodon/components/scrollable_list.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/mastodon/components/scrollable_list.js b/app/javascript/mastodon/components/scrollable_list.js
index 253646ed0..b8fa0c2d9 100644
--- a/app/javascript/mastodon/components/scrollable_list.js
+++ b/app/javascript/mastodon/components/scrollable_list.js
@@ -199,7 +199,12 @@ export default class ScrollableList extends PureComponent {
     this.clearMouseIdleTimer();
     this.detachScrollListener();
     this.detachIntersectionObserver();
+
     detachFullscreenListener(this.onFullScreenChange);
+
+    if (this.props.onScrollToTop) {
+      this.props.onScrollToTop();
+    }
   }
 
   onFullScreenChange = () => {