From: Ondřej Hruška Date: Tue, 8 Aug 2017 22:21:58 +0000 (+0200) Subject: add scrollTop to ui/components/column (#4563) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=820099813fe4ff824b939cc60c690be369997c59;p=mastodon.git add scrollTop to ui/components/column (#4563) --- 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();