Fix bug where button wouldn't be highlighted after hitting browser back button despite the cursor resting above it
This commit is contained in:
parent
8daf2df6e6
commit
42f6842844
@ -28,6 +28,7 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria
|
||||
to={this.props.tutorialInfo.location}
|
||||
className="text-decoration-none"
|
||||
onMouseEnter={this._onHover.bind(this)}
|
||||
onMouseOver={this._onHover.bind(this)}
|
||||
onMouseLeave={this._onHoverOff.bind(this)}
|
||||
>
|
||||
<div
|
||||
@ -64,6 +65,9 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria
|
||||
);
|
||||
}
|
||||
private _onHover(_event: React.FormEvent<HTMLInputElement>): void {
|
||||
if (this.state.isHovering) {
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
isHovering: true,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user