1
0
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:
ralphwetzel 2022-06-30 21:52:16 +02:00
parent 6090a5b274
commit 3726d6fe3b

View File

@ -265,13 +265,18 @@ RED.keyboard = (function() {
if (partialState) {
partialState = null;
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;
evt.preventDefault();
return null;
} else {
return null;
break;
}
}
}
return null;
} else {
var depth = Infinity;
var matchedHandler;