aboutsummaryrefslogtreecommitdiff
path: root/editor/editor.ts
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-15 01:00:32 +0700
committerShulhan <ms@kilabit.info>2023-11-15 01:00:32 +0700
commite38aeae379593b9e4a34042d3da998a91d38d4ef (patch)
tree74f37d916dad147d233210cdfed6b9b93a7e63df /editor/editor.ts
parentfeddd48bfd6d74142b53ba50406b9c29080d94af (diff)
downloadpakakeh.ts-e38aeae379593b9e4a34042d3da998a91d38d4ef.tar.xz
editor: use CTRL+Enter to trigger save instead of CTRL+s
Using CTRL+s sometimes cause pressing s only trigger the save.
Diffstat (limited to 'editor/editor.ts')
-rw-r--r--editor/editor.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/editor.ts b/editor/editor.ts
index e949951..dc11438 100644
--- a/editor/editor.ts
+++ b/editor/editor.ts
@@ -163,10 +163,6 @@ export class WuiEditor {
break;
case "Enter":
- this.addNewLine();
- break;
-
- case "s":
if (ed.isKeyControl) {
ev.preventDefault();
ev.stopPropagation();
@@ -175,8 +171,11 @@ export class WuiEditor {
ed.opts.onSave(content);
ed.render(content);
}
+ return false;
}
- break;
+
+ this.addNewLine();
+ return false;
}
return true;
}