diff options
author | Reverite <github@reverite.sh> | 2019-10-07 13:53:25 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-10-07 13:53:25 -0700 |
commit | 38afc782051fe6faf06c2c9ca20304dd946cfb5c (patch) | |
tree | 2ff5e256635cbbeabe3347b6a0772415f9f1426c /app/javascript/flavours/glitch/containers/mastodon.js | |
parent | 46ada47e09af0da9c776ef83c0ff034c720a83d6 (diff) | |
parent | d2f7b8685cfd0ec9b69af505b56c791d9b5f1c82 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/containers/mastodon.js')
-rw-r--r-- | app/javascript/flavours/glitch/containers/mastodon.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/containers/mastodon.js b/app/javascript/flavours/glitch/containers/mastodon.js index 59eef6636..8101be87e 100644 --- a/app/javascript/flavours/glitch/containers/mastodon.js +++ b/app/javascript/flavours/glitch/containers/mastodon.js @@ -49,6 +49,10 @@ export default class Mastodon extends React.PureComponent { } } + shouldUpdateScroll (_, { location }) { + return !(location.state && location.state.mastodonModalOpen); + } + render () { const { locale } = this.props; @@ -57,7 +61,7 @@ export default class Mastodon extends React.PureComponent { <Provider store={store}> <ErrorBoundary> <BrowserRouter basename='/web'> - <ScrollContext> + <ScrollContext shouldUpdateScroll={this.shouldUpdateScroll}> <Route path='/' component={UI} /> </ScrollContext> </BrowserRouter> |