From 2700f8cdd2fb09a5907c274c702b94f8ee8d902b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 17 Jan 2018 23:14:18 +0000 Subject: [PATCH] Try to surpress the system context menu on Ctrl-Click in canvas --- editor/js/ui/view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/js/ui/view.js b/editor/js/ui/view.js index 06ee3d505..a8cc40080 100644 --- a/editor/js/ui/view.js +++ b/editor/js/ui/view.js @@ -81,6 +81,9 @@ RED.view = (function() { .style("cursor","crosshair") .on("mousedown", function() { focusView(); + }) + .on("contextmenu", function(){ + d3.event.preventDefault(); }); var vis = outer @@ -1393,7 +1396,7 @@ RED.view = (function() { function portMouseUp(d,portType,portIndex) { var i; - if (mouse_mode === RED.state.QUICK_JOINING) { + if (mouse_mode === RED.state.QUICK_JOINING && drag_lines.length > 0) { if (drag_lines[0].node===d) { return }