mirror of
https://github.com/node-red/node-red
synced 2024-11-21 23:48:30 +00:00
parent
674eb36e15
commit
aa74d8160a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user