From 760f0e11f6a6f67e1d2f840be0bc0678b15fc9ad Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 3 Apr 2021 18:27:15 +0100 Subject: [PATCH] Click on background clears yellow haloes Signed-off-by: Ian Jackson --- templates/script.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/script.ts b/templates/script.ts index c92f13cf..fd682836 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -735,6 +735,11 @@ function drag_mousedown(e : MouseEvent, shifted: boolean) { var piece = target.dataset.piece!; if (!piece) { if (!shifted) { + let mr; + while (mr = movements.pop()) { + mr.p.last_seen_moved = null; + redisplay_ancillaries(mr.piece, mr.p); + } ungrab_all(); } return; -- 2.30.2