* Fix “read more” button behing hidden (regression from #11404) This has the side-effect of putting the “Read more” button below possibly trunctated polls instead of putting the poll below the “Read more” * Remove dead code
This commit is contained in:
parent
d5963d9401
commit
80d8ff97e4
1 changed files with 9 additions and 10 deletions
|
@ -165,11 +165,6 @@ export default class StatusContent extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleCollapsedClick = (e) => {
|
||||
e.preventDefault();
|
||||
this.setState({ collapsed: !this.state.collapsed });
|
||||
}
|
||||
|
||||
setRef = (c) => {
|
||||
this.node = c;
|
||||
}
|
||||
|
@ -233,15 +228,19 @@ export default class StatusContent extends React.PureComponent {
|
|||
</div>
|
||||
);
|
||||
} else if (this.props.onClick) {
|
||||
return (
|
||||
const output = [
|
||||
<div className={classNames} ref={this.setRef} tabIndex='0' style={directionStyle} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
|
||||
<div className='status__content__text status__content__text--visible' style={directionStyle} dangerouslySetInnerHTML={content} lang={status.get('language')} />
|
||||
|
||||
{!!this.state.collapsed && readMoreButton}
|
||||
|
||||
{!!status.get('poll') && <PollContainer pollId={status.get('poll')} />}
|
||||
</div>
|
||||
);
|
||||
</div>,
|
||||
];
|
||||
|
||||
if (this.state.collapsed) {
|
||||
output.push(readMoreButton);
|
||||
}
|
||||
|
||||
return output;
|
||||
} else {
|
||||
return (
|
||||
<div className={classNames} ref={this.setRef} tabIndex='0' style={directionStyle}>
|
||||
|
|
Loading…
Reference in a new issue