about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/column.js
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-08-09 00:21:58 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-08-09 00:21:58 +0200
commit820099813fe4ff824b939cc60c690be369997c59 (patch)
tree3040d360ed73b0ebda2ffff0ef9b7990f85aad4f /app/javascript/mastodon/features/ui/components/column.js
parent2ebe4ff5685ea022f8626e8917f5d6ae8b09d6e9 (diff)
add scrollTop to ui/components/column (#4563)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/column.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/column.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/ui/components/column.js b/app/javascript/mastodon/features/ui/components/column.js
index 9031c16fc..15538ea38 100644
--- a/app/javascript/mastodon/features/ui/components/column.js
+++ b/app/javascript/mastodon/features/ui/components/column.js
@@ -25,6 +25,17 @@ export default class Column extends React.PureComponent {
     this._interruptScrollAnimation = scrollTop(scrollable);
   }
 
+  scrollTop () {
+    const scrollable = this.node.querySelector('.scrollable');
+
+    if (!scrollable) {
+      return;
+    }
+
+    this._interruptScrollAnimation = scrollTop(scrollable);
+  }
+
+
   handleScroll = debounce(() => {
     if (typeof this._interruptScrollAnimation !== 'undefined') {
       this._interruptScrollAnimation();