From 99c72830bc8c426a12c3f5dc4eabff1ece99eac4 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 10 Oct 2023 11:35:32 +0200 Subject: [PATCH] [Glitch] Fix scroll position in thread view reseting when closing a modal Port 9d1c3d06783b9f7707e7e57d3d75553a02e8a9f5 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/status/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/status/index.jsx b/app/javascript/flavours/glitch/features/status/index.jsx index 598f30a1f..25666aeea 100644 --- a/app/javascript/flavours/glitch/features/status/index.jsx +++ b/app/javascript/flavours/glitch/features/status/index.jsx @@ -653,7 +653,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; }