mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Finetune keyboard shortcut management
This commit is contained in:
parent
6090a5b274
commit
3726d6fe3b
@ -265,13 +265,18 @@ RED.keyboard = (function() {
|
|||||||
if (partialState) {
|
if (partialState) {
|
||||||
partialState = null;
|
partialState = null;
|
||||||
return resolveKeyEvent(evt);
|
return resolveKeyEvent(evt);
|
||||||
} else if (Object.keys(handler).length > 0) {
|
}
|
||||||
|
if (Object.keys(handler).length > 0) {
|
||||||
|
// check if there's a potential combined handler initiated by this keyCode
|
||||||
|
for (h in handler) {
|
||||||
|
if (matchHandlerToEvent(evt,handler[h]) > -1) {
|
||||||
partialState = handler;
|
partialState = handler;
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
return null;
|
break;
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
} else {
|
} else {
|
||||||
var depth = Infinity;
|
var depth = Infinity;
|
||||||
var matchedHandler;
|
var matchedHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user