« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/client.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/client.js b/static/client.js
index fe4f5c45..d2ca95cc 100644
--- a/static/client.js
+++ b/static/client.js
@@ -239,6 +239,7 @@ const infoCard = (() => {
 
     let cancelShow = false;
     let hideTimeout = null;
+    let showing = false;
 
     container.addEventListener('mouseenter', cancelHide);
     container.addEventListener('mouseleave', readyHide);
@@ -253,6 +254,8 @@ const infoCard = (() => {
                 return;
             }
 
+            showing = true;
+
             const rect = target.getBoundingClientRect();
 
             container.style.setProperty('--primary-color', data.color);
@@ -333,10 +336,11 @@ const infoCard = (() => {
         container.classList.remove('show');
         container.classList.add('hide');
         cancelShow = true;
+        showing = false;
     }
 
     function readyHide() {
-        if (!hideTimeout) {
+        if (!hideTimeout && showing) {
             hideTimeout = setTimeout(hide, HIDE_HOVER_DELAY);
         }
     }