Skip to content

Commit

Permalink
Fix “read more” button behing hidden (regression from mastodon#11404)
Browse files Browse the repository at this point in the history
This has the side-effect of putting the “Read more” button below possibly
trunctated polls instead of putting the poll below the “Read more”
  • Loading branch information
ClearlyClaire committed Aug 8, 2019
1 parent f51c7c1 commit 1c590a5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/javascript/mastodon/components/status_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,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}>
Expand Down

0 comments on commit 1c590a5

Please sign in to comment.