From 00a19aa13910f645c6115870863be96d99d56389 Mon Sep 17 00:00:00 2001 From: HMH Date: Fri, 18 Oct 2024 16:12:47 +0200 Subject: [PATCH] Disable context menu on canvas. --- ts/lib.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ts/lib.ts b/ts/lib.ts index a3b3ae7..53f72d4 100644 --- a/ts/lib.ts +++ b/ts/lib.ts @@ -1043,6 +1043,11 @@ function init() { event.stopPropagation(); return false; }; + canvas.oncontextmenu = function(event) { + event.preventDefault(); + event.stopPropagation(); + return false; + }; let toggle_fullscreen_btn = document.getElementById("fullscreen") as HTMLButtonElement;