aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-02 05:04:06 +0800
committerFabio Berger <me@fabioberger.com>2018-10-02 05:04:06 +0800
commit42f68428446dfaa5c336c94f94e6c92325e470da (patch)
treebb88925a5b63b93101c610a44d7f0f1612dae40e /packages/website/ts/components
parent8daf2df6e6739239b3f00032f784a7136819dd82 (diff)
downloaddexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar.gz
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar.bz2
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar.lz
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar.xz
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.tar.zst
dexon-sol-tools-42f68428446dfaa5c336c94f94e6c92325e470da.zip
Fix bug where button wouldn't be highlighted after hitting browser back button despite the cursor resting above it
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/documentation/tutorial_button.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx
index e0839bbf2..aee094b86 100644
--- a/packages/website/ts/components/documentation/tutorial_button.tsx
+++ b/packages/website/ts/components/documentation/tutorial_button.tsx
@@ -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,
});