From bcada645fc241ff8470bf2779a9aaad6441a373c Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Fri, 9 Aug 2019 11:35:29 +0200 Subject: [PATCH] Avoid starting the vc item's movement on right click --- visual_console_client/src/lib/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/visual_console_client/src/lib/index.ts b/visual_console_client/src/lib/index.ts index d42d4580cf..2a3c709de8 100644 --- a/visual_console_client/src/lib/index.ts +++ b/visual_console_client/src/lib/index.ts @@ -538,6 +538,9 @@ export function addMovementListener( document.body.style.userSelect = "auto"; }; const handleStart = (e: MouseEvent) => { + // Avoid starting the movement on right click. + if (e.button === 2) return; + e.stopPropagation(); // Disable the drag temporarily.