about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-05-06 17:39:07 -0500
committerGitHub <noreply@github.com>2018-05-06 17:39:07 -0500
commit2e25da4da0dffebafe60cd6827559ac69b89abc7 (patch)
tree696d3e84b9130ffa12131f62ce8a1555bad180a6 /app/javascript/flavours
parenta0629c5696eb8ce068ade1298e156ce5a8d4a643 (diff)
parentde7feea30ea4ed3a514740706f1d2023e3103429 (diff)
Merge pull request #465 from ThibG/glitch-soc/rollback-scroll-changes
Glitch soc/rollback scroll changes
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/components/scrollable_list.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js
index b8281b1ee..df3ace4c1 100644
--- a/app/javascript/flavours/glitch/components/scrollable_list.js
+++ b/app/javascript/flavours/glitch/components/scrollable_list.js
@@ -35,7 +35,6 @@ export default class ScrollableList extends PureComponent {
 
   state = {
     fullscreen: null,
-    mouseOver: false,
   };
 
   intersectionObserverWrapper = new IntersectionObserverWrapper();
@@ -86,7 +85,7 @@ export default class ScrollableList extends PureComponent {
     const someItemInserted = React.Children.count(prevProps.children) > 0 &&
       React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&
       this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);
-    if (someItemInserted && this.node.scrollTop > 0 || (this.state.mouseOver && !prevProps.isLoading)) {
+    if (someItemInserted && this.node.scrollTop > 0) {
       return this.node.scrollHeight - this.node.scrollTop;
     } else {
       return null;
@@ -148,14 +147,6 @@ export default class ScrollableList extends PureComponent {
     this.props.onScrollToBottom();
   }
 
-  handleMouseEnter = () => {
-    this.setState({ mouseOver: true });
-  }
-
-  handleMouseLeave = () => {
-    this.setState({ mouseOver: false });
-  }
-
   render () {
     const { children, scrollKey, trackScroll, shouldUpdateScroll, isLoading, hasMore, prepend, emptyMessage } = this.props;
     const { fullscreen } = this.state;
@@ -166,7 +157,7 @@ export default class ScrollableList extends PureComponent {
 
     if (isLoading || childrenCount > 0 || !emptyMessage) {
       scrollableArea = (
-        <div className={classNames('scrollable', { fullscreen })} ref={this.setRef} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
+        <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>
           <div role='feed' className='item-list'>
             {prepend}