From 42f68428446dfaa5c336c94f94e6c92325e470da Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Mon, 1 Oct 2018 22:04:06 +0100
Subject: Fix bug where button wouldn't be highlighted after hitting browser
 back button despite the cursor resting above it

---
 packages/website/ts/components/documentation/tutorial_button.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'packages/website/ts/components/documentation/tutorial_button.tsx')

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,
         });
-- 
cgit 

