]> Untitled Git - lemmy-ui.git/commitdiff
Fix restore scroll position. Fixes #227
authorDessalines <tyhou13@gmx.com>
Thu, 25 Mar 2021 15:38:37 +0000 (11:38 -0400)
committerDessalines <tyhou13@gmx.com>
Thu, 25 Mar 2021 15:38:37 +0000 (11:38 -0400)
src/shared/components/post.tsx

index c2ef814ceff8fe0dd33ce207b3da2e065d5f1fdd..e27a73dd020d817e0c244f73c8eb6c71121bd67a 100644 (file)
@@ -463,7 +463,7 @@ export class Post extends Component<any, PostState> {
       this.fetchCrossPosts();
       this.setState(this.state);
       setupTippy();
-      restoreScrollPosition(this.context);
+      if (!this.state.commentId) restoreScrollPosition(this.context);
     } else if (op == UserOperation.CreateComment) {
       let data = wsJsonToRes<CommentResponse>(msg).data;