fix ctrl+enter in sql console

This commit is contained in:
zadam
2019-08-25 21:55:36 +02:00
parent 233a50dbb7
commit 24a3f814ed
3 changed files with 7 additions and 6 deletions
@@ -50,11 +50,7 @@ async function initEditor() {
codeEditor.focus();
}
async function execute(e) {
// stop from propagating upwards (dangerous especially with ctrl+enter executable javascript notes)
e.preventDefault();
e.stopPropagation();
async function execute() {
// execute the selected text or the whole content if there's no selection
let sqlQuery = codeEditor.getSelection();
+2 -1
View File
@@ -141,9 +141,10 @@ function bindElShortcut($el, keyboardShortcut, handler) {
}
$el.bind('keydown', keyboardShortcut, e => {
handler();
handler(e);
e.preventDefault();
e.stopPropagation();
});
}
}