From e915bc3e9e32e34bf80d1bd66ee3f80d2ca37969 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 3 Sep 2018 13:32:35 +0200 Subject: Fixes columns scrolling to top when opening media modal Fixes #700 --- app/javascript/flavours/glitch/features/followers/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/followers/index.js') diff --git a/app/javascript/flavours/glitch/features/followers/index.js b/app/javascript/flavours/glitch/features/followers/index.js index c42e0386c..cdde1775c 100644 --- a/app/javascript/flavours/glitch/features/followers/index.js +++ b/app/javascript/flavours/glitch/features/followers/index.js @@ -56,6 +56,10 @@ export default class Followers extends ImmutablePureComponent { this.props.dispatch(expandFollowers(this.props.params.accountId)); } + shouldUpdateScroll = (prevRouterProps, { location }) => { + return !(location.state && location.state.mastodonModalOpen); + } + render () { const { accountIds, hasMore } = this.props; @@ -77,7 +81,7 @@ export default class Followers extends ImmutablePureComponent { - +
-- cgit