Fix animate on hover in poll options without CW (#11404)

pull/11424/head
ThibG 2019-07-28 13:48:05 +02:00 committed by Eugen Rochko
parent 6a1f08d29a
commit 9349f1067a
1 changed files with 13 additions and 36 deletions

View File

@ -234,46 +234,23 @@ export default class StatusContent extends React.PureComponent {
</div>
);
} else if (this.props.onClick) {
const output = [
<div
ref={this.setRef}
tabIndex='0'
key='content'
className={classNames}
style={directionStyle}
dangerouslySetInnerHTML={content}
lang={status.get('language')}
onMouseDown={this.handleMouseDown}
onMouseUp={this.handleMouseUp}
/>,
];
return (
<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')} />
if (this.state.collapsed) {
output.push(readMoreButton);
}
{!!this.state.collapsed && readMoreButton}
if (status.get('poll')) {
output.push(<PollContainer pollId={status.get('poll')} />);
}
return output;
{!!status.get('poll') && <PollContainer pollId={status.get('poll')} />}
</div>
);
} else {
const output = [
<div
tabIndex='0'
ref={this.setRef}
className='status__content'
style={directionStyle}
dangerouslySetInnerHTML={content}
lang={status.get('language')}
/>,
];
return (
<div className={classNames} ref={this.setRef} tabIndex='0' style={directionStyle}>
<div className='status__content__text status__content__text--visible' style={directionStyle} dangerouslySetInnerHTML={content} lang={status.get('language')} />
if (status.get('poll')) {
output.push(<PollContainer pollId={status.get('poll')} />);
}
return output;
{!!status.get('poll') && <PollContainer pollId={status.get('poll')} />}
</div>
);
}
}