Use mouseleave instead of mouseout for hover events. Fix tooltip flicker
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
58532f2ac4
commit
e9633b2e3b
8 changed files with 29 additions and 24 deletions
|
@ -37,7 +37,7 @@ export default class TextWithTooltip extends React.Component {
|
|||
this.setState({hover: true});
|
||||
};
|
||||
|
||||
onMouseOut = () => {
|
||||
onMouseLeave = () => {
|
||||
this.setState({hover: false});
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ export default class TextWithTooltip extends React.Component {
|
|||
const Tooltip = sdk.getComponent("elements.Tooltip");
|
||||
|
||||
return (
|
||||
<span onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} className={this.props.class}>
|
||||
<span onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} className={this.props.class}>
|
||||
{this.props.children}
|
||||
<Tooltip
|
||||
label={this.props.tooltip}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue