Merge pull request #4382 from hazymat/master

Ctrl-Enter does not close tray (Monaco) #4377
This commit is contained in:
Nick O'Leary 2023-11-01 14:15:08 +01:00 committed by GitHub
commit 245751bb23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -966,12 +966,10 @@ RED.editor.codeEditor.monaco = (function() {
//Unbind ctrl-Enter (default action is to insert a newline in editor) This permits the shortcut to close the tray.
try {
ed._standaloneKeybindingService.addDynamicKeybinding(
'-editor.action.insertLineAfter', // command ID prefixed by '-'
null, // keybinding
() => {} // need to pass an empty handler
);
} catch (error) { }
monaco.editor.addKeybindingRule({keybinding: 0, command: "-editor.action.insertLineAfter"});
} catch (error) {
console.warn(error)
}
ed.nodered = {
refreshModuleLibs: refreshModuleLibs //expose this for function node externalModules refresh