From 9903e3d508537e6912e38f61739971af1949f25e Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Thu, 2 May 2019 15:16:38 -0700
Subject: Fix scrolling issue on refetch.

---
 ui/src/components/communities.tsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'ui/src/components/communities.tsx')

diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx
index 190f8e3d..96864e9a 100644
--- a/ui/src/components/communities.tsx
+++ b/ui/src/components/communities.tsx
@@ -174,6 +174,7 @@ export class Communities extends Component<any, CommunitiesState> {
       this.state.communities = res.communities;
       this.state.communities.sort((a, b) => b.number_of_subscribers - a.number_of_subscribers);
       this.state.loading = false;
+      window.scrollTo(0,0);
       this.setState(this.state);
     } else if (op == UserOperation.FollowCommunity) {
       let res: CommunityResponse = msg;
-- 
cgit v1.2.3

