about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-28 16:42:04 +0100
committerGitHub <noreply@github.com>2022-11-28 16:42:04 +0100
commit2d4d99f13559490831f3123e39fcbc7ece2e345a (patch)
treeb8367c0d425441893695d9f598132c4abab1cec8
parentcec1e902e006730f68bde0a4334e5b819a12a475 (diff)
Fix expanded statuses not always being scrolled into view (#21797)
-rw-r--r--app/javascript/mastodon/features/status/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js
index cb67944c9..8a63cced2 100644
--- a/app/javascript/mastodon/features/status/index.js
+++ b/app/javascript/mastodon/features/status/index.js
@@ -222,6 +222,10 @@ class Status extends ImmutablePureComponent {
       this.props.dispatch(fetchStatus(nextProps.params.statusId));
     }
 
+    if (nextProps.params.statusId && nextProps.ancestorsIds.size > this.props.ancestorsIds.size) {
+      this._scrolledIntoView = false;
+    }
+
     if (nextProps.status && nextProps.status.get('id') !== this.state.loadedStatusId) {
       this.setState({ showMedia: defaultMediaVisibility(nextProps.status), loadedStatusId: nextProps.status.get('id') });
     }