~cytrogen/masto-fe

9d1c3d06783b9f7707e7e57d3d75553a02e8a9f5 — Claire 2 years ago 1a2a4c3
Fix scroll position in thread view reseting when closing a modal (#27350)

1 files changed, 1 insertions(+), 1 deletions(-)

M app/javascript/mastodon/features/status/index.jsx
M app/javascript/mastodon/features/status/index.jsx => app/javascript/mastodon/features/status/index.jsx +1 -1
@@ 619,7 619,7 @@ class Status extends ImmutablePureComponent {

  shouldUpdateScroll = (prevRouterProps, { location }) => {
    // Do not change scroll when opening a modal
    if (location.state?.mastodonModalKey && location.state?.mastodonModalKey !== prevRouterProps?.location?.state?.mastodonModalKey) {
    if (location.state?.mastodonModalKey !== prevRouterProps?.location?.state?.mastodonModalKey) {
      return false;
    }