From 19b0eeeffda9c9bc49891d8cfcd256e2c9a07c64 Mon Sep 17 00:00:00 2001 From: Davide Passoni Date: Thu, 8 Aug 2024 15:39:38 +0200 Subject: [PATCH] Fixed error preventing operation on touch screen for position actions --- frontend/react/src/map/map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/react/src/map/map.ts b/frontend/react/src/map/map.ts index b26e9b1e..d5f33550 100644 --- a/frontend/react/src/map/map.ts +++ b/frontend/react/src/map/map.ts @@ -880,7 +880,7 @@ export class Map extends L.Map { } } } else if (this.#state === CONTEXT_ACTION) { - if (e.originalEvent.buttons === 1) { + if (e.type === 'touchstart' || e.originalEvent.buttons === 1) { if (this.#contextAction !== null) this.executeContextAction(null, pressLocation); else this.setState(IDLE); } else if (e.originalEvent.buttons === 2) {