diff --git a/app/javascript/flavours/blobfox/components/status.jsx b/app/javascript/flavours/blobfox/components/status.jsx index 65a578ef3aa072..d37fdc7b5422d7 100644 --- a/app/javascript/flavours/blobfox/components/status.jsx +++ b/app/javascript/flavours/blobfox/components/status.jsx @@ -131,6 +131,7 @@ class Status extends ImmutablePureComponent { state = { isCollapsed: false, autoCollapsed: false, + tootHeight: 0, isExpanded: undefined, showMedia: undefined, statusId: undefined, @@ -289,7 +290,7 @@ class Status extends ImmutablePureComponent { ) { this.setCollapsed(true); // Hack to fix timeline jumps on second rendering when auto-collapsing - this.setState({ autoCollapsed: true }); + this.setState({ autoCollapsed: true, tootHeight: node.clientHeight}); } // Hack to fix timeline jumps when a preview card is fetched @@ -552,7 +553,7 @@ class Status extends ImmutablePureComponent { history, ...other } = this.props; - const { isCollapsed } = this.state; + const { isCollapsed, tootHeight } = this.state; let background = null; let attachments = null; @@ -864,7 +865,7 @@ class Status extends ImmutablePureComponent { expanded={isExpanded} collapsed={isCollapsed} autoCollapsed={this.state.autoCollapsed} - //tootHeight={node.clientHeight} + tootHeight={tootHeight} collapseHeight={settings.getIn(['collapsed', 'auto', 'height'])} onExpandedToggle={this.handleExpandedToggle} onTranslate={this.handleTranslate} diff --git a/app/javascript/flavours/blobfox/components/status_content.jsx b/app/javascript/flavours/blobfox/components/status_content.jsx index 8eae40f6a73679..7c7e8612f5ffa8 100644 --- a/app/javascript/flavours/blobfox/components/status_content.jsx +++ b/app/javascript/flavours/blobfox/components/status_content.jsx @@ -268,6 +268,7 @@ class StatusContent extends PureComponent { const { status, collapseHeight, + tootHeight, muted, } = this.props; @@ -294,7 +295,7 @@ class StatusContent extends PureComponent { parseInt(collapseHeight) ) if (tempCollapsedHeight > clientHeight) ( - tempCollapsedHeight = clientHeight + tempCollapsedHeight - (clientHeight - tootHeight) ) tempCollapsedHeight = clientHeight;