Merge pull request #5055 from matrix-org/t3chguy/fix/14700

Fix TextWithTooltip "leaking" tooltip wrappers
This commit is contained in:
Michael Telatynski 2020-07-28 10:40:52 +01:00 committed by GitHub
commit 0ee30a07a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,11 +47,10 @@ export default class TextWithTooltip extends React.Component {
return ( return (
<span onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} className={this.props.class}> <span onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} className={this.props.class}>
{this.props.children} {this.props.children}
<Tooltip {this.state.hover && <Tooltip
label={this.props.tooltip} label={this.props.tooltip}
visible={this.state.hover}
tooltipClassName={this.props.tooltipClass} tooltipClassName={this.props.tooltipClass}
className={"mx_TextWithTooltip_tooltip"} /> className={"mx_TextWithTooltip_tooltip"} /> }
</span> </span>
); );
} }