diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-28 16:42:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 16:42:04 +0100 |
commit | 2d4d99f13559490831f3123e39fcbc7ece2e345a (patch) | |
tree | b8367c0d425441893695d9f598132c4abab1cec8 /app | |
parent | cec1e902e006730f68bde0a4334e5b819a12a475 (diff) |
Fix expanded statuses not always being scrolled into view (#21797)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/status/index.js | 4 |
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') }); } |