Skip to content

Commit

Permalink
Fix animate on hover in poll options without CW (#11404)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed Jul 28, 2019
1 parent 6a1f08d commit 9349f10
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions app/javascript/mastodon/components/status_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>,
];

if (this.state.collapsed) {
output.push(readMoreButton);
}
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 (status.get('poll')) {
output.push(<PollContainer pollId={status.get('poll')} />);
}
{!!this.state.collapsed && readMoreButton}

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')}
/>,
];

if (status.get('poll')) {
output.push(<PollContainer pollId={status.get('poll')} />);
}
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')} />

return output;
{!!status.get('poll') && <PollContainer pollId={status.get('poll')} />}
</div>
);
}
}

Expand Down

0 comments on commit 9349f10

Please sign in to comment.