« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static
diff options
context:
space:
mode:
Diffstat (limited to 'src/static')
-rw-r--r--src/static/client3.js10
-rw-r--r--src/static/site5.css2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/static/client3.js b/src/static/client3.js
index db9e5505..88df58de 100644
--- a/src/static/client3.js
+++ b/src/static/client3.js
@@ -813,6 +813,7 @@ function addHoverableTooltipPageListeners() {
     const {state} = hoverableTooltipInfo;
 
     const hoverables = Array.from(state.registeredHoverables.keys());
+    const tooltips = Array.from(state.registeredTooltips.keys());
 
     const endedTouches = Array.from(domEvent.changedTouches);
 
@@ -825,14 +826,15 @@ function addHoverableTooltipPageListeners() {
 
     if (empty(unbanishedTouches)) return;
 
-    // TODO: https://github.com/tc39/proposal-iterator-helpers
-    const anyTouchOverAnyHoverable =
+    const anyTouchOverAnyHoverableOrTooltip =
       unbanishedTouches.some(({clientX, clientY}) => {
         const element = document.elementFromPoint(clientX, clientY);
-        return hoverables.some(hoverable => hoverable.contains(element));
+        if (hoverables.some(el => el.contains(element))) return true;
+        if (tooltips.some(el => el.contains(element))) return true;
+        return false;
       });
 
-    if (!anyTouchOverAnyHoverable) {
+    if (!anyTouchOverAnyHoverableOrTooltip) {
       hideCurrentlyShownTooltip();
     }
   });
diff --git a/src/static/site5.css b/src/static/site5.css
index 06696799..582681bb 100644
--- a/src/static/site5.css
+++ b/src/static/site5.css
@@ -489,7 +489,7 @@ a:not([href]):hover {
 
 .icons-tooltip {
   position: absolute;
-  z-index: 999;
+  z-index: 1;
   left: -12px;
   top: calc(1em - 2px);
   padding: 4px 12px 6px 8px;