Browse Source

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>
for-closed-social
Michael Kuhn 4 years ago
committed by GitHub
parent
commit
ecb176851b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      web_src/js/index.js

+ 2
- 0
web_src/js/index.js View File

@ -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)) {

Loading…
Cancel
Save