From 9d1c3d06783b9f7707e7e57d3d75553a02e8a9f5 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 10 Oct 2023 11:35:32 +0200 Subject: [PATCH] Fix scroll position in thread view reseting when closing a modal (#27350) --- app/javascript/mastodon/features/status/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 39823268b..d6a6deeb7 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -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; }