From: Ian Jackson Date: Sun, 26 Jun 2022 00:46:07 +0000 (+0100) Subject: script: Fix event propagation (for Chromium) X-Git-Tag: otter-1.2.1~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=52f9b90384b593e29be4c53376ed5f165f976bad;p=otter.git script: Fix event propagation (for Chromium) Apparently Chromium handles default behaviour of mouse events differently, and we need to suppress it like this. Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 519c6fe6..8039a000 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -1026,6 +1026,8 @@ function some_mousedown(e : MouseEvent) { if (e.ctrlKey) { return; } else { + e.preventDefault(); + e.stopPropagation(); drag_mousedown(e, e.shiftKey); } }