diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index fd1205a30..40ec0d5bf 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -1209,7 +1209,11 @@ RED.view = (function() { lasso = null; } if (d3.event.touches || d3.event.button === 0) { - if ((mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) && isControlPressed(d3.event) && !(d3.event.altKey || d3.event.shiftKey)) { + if ( + (mouse_mode === 0 && isControlPressed(d3.event) && !(d3.event.altKey || d3.event.shiftKey)) + || + mouse_mode === RED.state.QUICK_JOINING + ) { // Trigger quick add dialog d3.event.stopPropagation(); clearSelection(); @@ -1285,7 +1289,6 @@ RED.view = (function() { } var mainPos = $("#red-ui-main-container").position(); - if (mouse_mode !== RED.state.QUICK_JOINING) { mouse_mode = RED.state.QUICK_JOINING; $(window).on('keyup',disableQuickJoinEventHandler); @@ -3057,8 +3060,8 @@ RED.view = (function() { } function disableQuickJoinEventHandler(evt) { - // Check for ctrl (all browsers), "Meta" (Chrome/FF), keyCode 91 (Safari) - if (evt.keyCode === 17 || evt.key === "Meta" || evt.keyCode === 91) { + // Check for ctrl (all browsers), "Meta" (Chrome/FF), keyCode 91 (Safari), or Escape + if (evt.keyCode === 17 || evt.key === "Meta" || evt.keyCode === 91 || evt.keyCode === 27) { resetMouseVars(); hideDragLines(); redraw();