Skip to content

Build your personal knowledge base with Trilium Notes

escape will close SQL console, closes #72

azivnerb0bd27321a61
diff --git a/src/public/javascripts/dialogs/sql_console.js b/src/public/javascripts/dialogs/sql_console.js
index 7ad8783610..89e3b3b890 100644
--- a/src/public/javascripts/dialogs/sql_console.js
+++ b/src/public/javascripts/dialogs/sql_console.js
@@ -29,6 +29,9 @@ const sqlConsole = (function() {
CodeMirror.keyMap.default["Shift-Tab"] = "indentLess";
CodeMirror.keyMap.default["Tab"] = "indentMore";
+ // removing Escape binding so that Escape will propagate to the dialog (which will close on escape)
+ delete CodeMirror.keyMap.basic["Esc"];
+
CodeMirror.modeURL = 'libraries/codemirror/mode/%N/%N.js';
codeEditor = CodeMirror($query[0], {