Skip to content

Commit

Permalink
fix tooltip bug (#4466)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianjelfs authored Sep 29, 2023
1 parent 88a3eb5 commit 9959dc3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/app/src/components/Hoverable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -89,9 +91,7 @@
function onContextMenu(e: MouseEvent) {
e.preventDefault();
if (!isTouchDevice) {
startHover(e);
}
startHover(e);
}
onMount(() => {
Expand Down

0 comments on commit 9959dc3

Please sign in to comment.