diff options
| author | dax <me@dax.ist> | 2026-08-04 08:54:52 +0000 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 08:54:52 +0000 |
| commit | 731f74670740ca6920a481fa276011bc87fc8f9c (patch) | |
| tree | e3d5ea53c5fc29f174cf4b9f91eceadc595dae21 /public/app.js | |
| parent | 51062d0579eba3c8137298a88963eb6aeb57c2e2 (diff) | |
pathways: ghost preview only shows on real pointer movement (pointermove, not pointerenter) - prevents phantom ghosts when keyboard navigation re-renders arrows/dropzones under a stationary mouse
Diffstat (limited to 'public/app.js')
| -rw-r--r-- | public/app.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/app.js b/public/app.js index 98dcaed..c617e3a 100644 --- a/public/app.js +++ b/public/app.js @@ -213,7 +213,7 @@ function renderNav(id) { b.innerHTML = ARROW_SVG[ex.dir] b.addEventListener("pointerdown", (e) => e.stopPropagation()) b.addEventListener("click", (e) => { e.stopPropagation(); traverseFrom(id, ex.dir) }) - b.addEventListener("pointerenter", () => { + b.addEventListener("pointermove", () => { if (!adjacentTile(id, ex.dir)) showGhost(choosePlacement(id, ex.dir)) }) b.addEventListener("pointerleave", () => hideGhost()) @@ -371,7 +371,7 @@ function renderTileZones(id) { z.style.top = p.rect.y + "px" z.style.width = p.rect.w + "px" z.style.height = p.rect.h + "px" - z.addEventListener("pointerenter", () => showGhost(p)) + z.addEventListener("pointermove", () => showGhost(p)) z.addEventListener("pointerleave", () => hideGhost()) z.addEventListener("pointerdown", (e) => e.stopPropagation()) z.addEventListener("click", () => traverseFrom(id, dir)) |
