Merge pull request #3700 from ralphwetzel/master

Disable keyboard shortcut mapping when showing Edit[..]Dialog
This commit is contained in:
Nick O'Leary
2022-07-01 12:23:49 +01:00
committed by GitHub
2 changed files with 26 additions and 19 deletions

View File

@@ -265,13 +265,18 @@ RED.keyboard = (function() {
if (partialState) {
partialState = null;
return resolveKeyEvent(evt);
} else if (Object.keys(handler).length > 0) {
partialState = handler;
evt.preventDefault();
return null;
} else {
return null;
}
if (Object.keys(handler).length > 0) {
// check if there's a potential combined handler initiated by this keyCode
for (let h in handler) {
if (matchHandlerToEvent(evt,handler[h]) > -1) {
partialState = handler;
evt.preventDefault();
break;
}
}
}
return null;
} else {
var depth = Infinity;
var matchedHandler;