« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/static/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/client.js')
-rw-r--r--static/client.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/client.js b/static/client.js
index fe4f5c4..d2ca95c 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);
         }
     }