diff --git a/app/javascript/flavours/blobfox/components/status_content.jsx b/app/javascript/flavours/blobfox/components/status_content.jsx index 78db6ad148f5a5..3d55f8884388dd 100644 --- a/app/javascript/flavours/blobfox/components/status_content.jsx +++ b/app/javascript/flavours/blobfox/components/status_content.jsx @@ -160,7 +160,7 @@ class StatusContent extends PureComponent { hidden: true, collapsed: false, autoCollapsed: false, - collapsedHeight: 0, + collapsedHeight: null, clientHeight: null, }; @@ -281,12 +281,12 @@ class StatusContent extends PureComponent { if (node === undefined) return; - let tempCollapsedHeight = 0; + //let tempCollapsedHeight = 0; // this.setState({ collapseHeight: true }); - if (this.props.collapsed && !this.props.autoCollapsed && collapseHeight >= 40) { - tempCollapsedHeight = ( + if (this.props.autoCollapsed && collapseHeight >= 40) { + let tempCollapsedHeight = ( parseInt(collapseHeight) ) @@ -300,8 +300,8 @@ class StatusContent extends PureComponent { tempCollapsedHeight = 600; - this.setState({ collapsedHeight: parseInt(tempCollapsedHeight) }) - } else if (this.props.autoCollapsed || collapseHeight < 40) { + this.setState({ collapsedHeight: tempCollapsedHeight }) + } else if (!this.props.autoCollapsed || collapseHeight < 40) { this.setState({ collapsedHeight: 40 }) } }