From: Dessalines Date: Thu, 25 Mar 2021 15:38:37 +0000 (-0400) Subject: Fix restore scroll position. Fixes #227 X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7BdonateLemmyUrl%7D?a=commitdiff_plain;h=97219bd73bf2620237a947f21768e322d3671724;p=lemmy-ui.git Fix restore scroll position. Fixes #227 --- diff --git a/src/shared/components/post.tsx b/src/shared/components/post.tsx index c2ef814..e27a73d 100644 --- a/src/shared/components/post.tsx +++ b/src/shared/components/post.tsx @@ -463,7 +463,7 @@ export class Post extends Component { 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(msg).data;