diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-05-20 10:26:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 04:26:04 +0200 |
commit | cc7236e852e60e4dc9c4fb5692ac62697ef0e9e3 (patch) | |
tree | fdc3a7c3fbb3a5af6954673dfbb627619c0539aa /templates/repo | |
parent | 3b359b1629c3b6ae35c64c750fa66b9bd4f5d223 (diff) | |
download | gitea-cc7236e852e60e4dc9c4fb5692ac62697ef0e9e3.tar.gz gitea-cc7236e852e60e4dc9c4fb5692ac62697ef0e9e3.zip |
Make Ctrl+Enter (quick submit) work for issue comment and wiki editor (#19729)
* Make Ctrl+Enter (quick submit) work for issue comment and wiki editor
* Remove the required `SubmitReviewForm.Type`, empty type (triggered by quick submit) means "comment"
* Merge duplicate code
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/box.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 02c7dcd68a..a70532eca9 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -180,7 +180,7 @@ <a class="preview item" data-url="{{$.Repository.HTMLURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a> </div> <div class="ui bottom attached active write tab segment"> - <textarea class="review-textarea" tabindex="1" name="content"></textarea> + <textarea class="review-textarea js-quick-submit" tabindex="1" name="content"></textarea> </div> <div class="ui bottom attached tab preview segment markup"> {{$.i18n.Tr "loading"}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 8d4fc4f8b3..52353d46d9 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -202,7 +202,7 @@ </div> <div class="field"> <div class="ui bottom active tab write"> - <textarea tabindex="1" name="content"></textarea> + <textarea tabindex="1" name="content" class="js-quick-submit"></textarea> </div> <div class="ui bottom tab preview markup"> {{$.i18n.Tr "loading"}} |