Do not scroll timelines when *closing* media modals
Media modals push an history state so that pressing back on mobile closes them. We made sure to not scroll when opening them, but not when *closing* them, which caused some issues in rare cases.
This commit is contained in:
@ -57,6 +57,7 @@ export default class Followers extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
shouldUpdateScroll = (prevRouterProps, { location }) => {
|
||||
if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;
|
||||
return !(location.state && location.state.mastodonModalOpen);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user