summaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@informatik.uni-hamburg.de>2020-04-07 05:51:21 +0200
committerGitHub <noreply@github.com>2020-04-07 00:51:21 -0300
commitecb176851be67f74c4e62a3fe6bff4f2c29bf9c9 (patch)
tree6237792ca2d13089ebfce56762a2c10f624b2fab /web_src/js
parentb252b23f1659c2a81c252d7d9a7e0aef2aac91fb (diff)
downloadgitea-ecb176851be67f74c4e62a3fe6bff4f2c29bf9c9.tar.gz
gitea-ecb176851be67f74c4e62a3fe6bff4f2c29bf9c9.zip
Fix Ctrl-Enter shortcut for issues (#10986)
The js-quick-submit class needs to be applied to SimpleMDE's input field, which is currently only done for wiki pages. Fixes #10937 Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index 93b27483be..c56abdde88 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -1525,6 +1525,7 @@ function setSimpleMDE($editArea) {
},
]
});
+ $(simpleMDEditor.codemirror.getInputField()).addClass('js-quick-submit');
return true;
}
@@ -1556,6 +1557,7 @@ function setCommentSimpleMDE($editArea) {
},
]
});
+ $(simplemde.codemirror.getInputField()).addClass('js-quick-submit');
simplemde.codemirror.setOption('extraKeys', {
Enter: () => {
if (!(issuesTribute.isActive || emojiTribute.isActive)) {