logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 820099813fe4ff824b939cc60c690be369997c59
parent: 2ebe4ff5685ea022f8626e8917f5d6ae8b09d6e9
Author: Ondřej Hruška <ondra@ondrovo.com>
Date:   Wed,  9 Aug 2017 00:21:58 +0200

add scrollTop to ui/components/column (#4563)


Diffstat:

Mapp/javascript/mastodon/features/ui/components/column.js11+++++++++++
1 file 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 @@ -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();