From 9959dc3a68154e3827be06dcbc555ec1a50843c5 Mon Sep 17 00:00:00 2001 From: Julian Jelfs Date: Fri, 29 Sep 2023 17:21:29 +0100 Subject: [PATCH] fix tooltip bug (#4466) --- frontend/app/src/components/Hoverable.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/app/src/components/Hoverable.svelte b/frontend/app/src/components/Hoverable.svelte index 665ff0d4d1..a53f156f5a 100644 --- a/frontend/app/src/components/Hoverable.svelte +++ b/frontend/app/src/components/Hoverable.svelte @@ -23,9 +23,11 @@ let startY = 0; // mouse y position when timer started function startHover(e: MouseEvent) { - coords.x = e.clientX; - coords.y = e.clientY; - hoverTimer = window.setTimeout(() => (hovering = true), HOVER_DELAY); + if (!isTouchDevice) { + coords.x = e.clientX; + coords.y = e.clientY; + hoverTimer = window.setTimeout(() => (hovering = true), HOVER_DELAY); + } } function endHover() { @@ -89,9 +91,7 @@ function onContextMenu(e: MouseEvent) { e.preventDefault(); - if (!isTouchDevice) { - startHover(e); - } + startHover(e); } onMount(() => {