From 49ea07f0c32d23633d378d29ee489898a3a8d59c Mon Sep 17 00:00:00 2001 From: smol Date: Mon, 11 May 2020 17:59:09 +0200 Subject: [PATCH] little fix to prevent NWjs to show its own contextmenu on Mac OSX --- src/Main.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Main.hx b/src/Main.hx index 69a8bb6e..be048263 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -88,6 +88,7 @@ class Main extends Model { window.window.addEventListener("keyup", onKeyUp); window.window.addEventListener("mousemove", onMouseMove); window.window.addEventListener("dragover", function(e : js.html.Event) { e.preventDefault(); return false; }); + window.window.addEventListener("contextmenu", function(e : js.html.Event) { e.preventDefault(); return false; }); window.window.addEventListener("drop", onDragDrop); J(".modal").keypress(function(e) e.stopPropagation()).keydown(function(e) e.stopPropagation()); J("#search input").keydown(function(e) {