From 2d4d99f13559490831f3123e39fcbc7ece2e345a Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 28 Nov 2022 16:42:04 +0100 Subject: [PATCH] Fix expanded statuses not always being scrolled into view (#21797) --- app/javascript/mastodon/features/status/index.js | 4 ++++ 1 file changed, 4 insertions(+) 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') }); }