diff --git a/template/app/view/HoverMenuButton.js b/template/app/view/HoverMenuButton.js
index <HASH>..<HASH> 100644
--- a/template/app/view/HoverMenuButton.js
+++ b/template/app/view/HoverMenuButton.js
@@ -99,12 +99,13 @@ Ext.define('Docs.view.HoverMenuButton', {
     },
 
     deferHideMenu: function() {
+        // when showing in progress, stop it
+        clearTimeout(Docs.view.HoverMenuButton.showTimeout);
         // skip if nothing to hide
         if (!this.menu) {
             return;
         }
 
-        clearTimeout(Docs.view.HoverMenuButton.showTimeout);
         this.hideTimeout = Ext.Function.defer(function() {
             this.menu.hide();
         }, 200, this);
Improve show/hide of hover menu.

Fix the issue of hover menu not getting hidden at all when the button is
hovered for the first time and then immediately mouse moves away.