From: Eugen Rochko Date: Thu, 12 Sep 2019 18:14:59 +0000 (+0200) Subject: [Glitch] Fix scroll position resetting when opening media modals in web UI X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=0d421116711c7ba42bfc29432edd3b761ce7720a;p=mastodon.git [Glitch] Fix scroll position resetting when opening media modals in web UI Port 50755a47b4f0999f8c49501ff4fa4c2ef676fa0e to glitch-soc Signed-off-by: Thibaut Girka --- 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 { - +