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}
|
to={this.props.tutorialInfo.location}
|
||||||
className="text-decoration-none"
|
className="text-decoration-none"
|
||||||
onMouseEnter={this._onHover.bind(this)}
|
onMouseEnter={this._onHover.bind(this)}
|
||||||
|
onMouseOver={this._onHover.bind(this)}
|
||||||
onMouseLeave={this._onHoverOff.bind(this)}
|
onMouseLeave={this._onHoverOff.bind(this)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -64,6 +65,9 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
private _onHover(_event: React.FormEvent<HTMLInputElement>): void {
|
private _onHover(_event: React.FormEvent<HTMLInputElement>): void {
|
||||||
|
if (this.state.isHovering) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
isHovering: true,
|
isHovering: true,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user