From ecb176851be67f74c4e62a3fe6bff4f2c29bf9c9 Mon Sep 17 00:00:00 2001
From: Michael Kuhn <michael.kuhn@informatik.uni-hamburg.de>
Date: Tue, 7 Apr 2020 05:51:21 +0200
Subject: [PATCH] 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>
---
 web_src/js/index.js | 2 ++
 1 file changed, 2 insertions(+)

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