summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatalia Tepluhina <tarya.se@gmail.com>2018-12-27 17:14:54 +0200
committerPhil Hughes <me@iamphill.com>2019-01-07 08:56:32 +0000
commit98ad22d2aa21c7bf4e21c8d602fd8e83fedaf899 (patch)
treede3dcc968f24a7a6d9b30553468800029fc83862
parent32f80629bdbd4d2fcd43b6220da373394ffd95b6 (diff)
downloadgitlab-ce-98ad22d2aa21c7bf4e21c8d602fd8e83fedaf899.tar.gz
Added handleKeySubmit method to match EE8535-add-mr-comment-on-ctrl-enter
-rw-r--r--app/assets/javascripts/notes/components/note_form.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue
index e78596f8b52..db62ddb3ecd 100644
--- a/app/assets/javascripts/notes/components/note_form.vue
+++ b/app/assets/javascripts/notes/components/note_form.vue
@@ -149,6 +149,9 @@ export default {
return shouldResolve || shouldToggleState;
},
+ handleKeySubmit() {
+ this.handleUpdate();
+ },
handleUpdate(shouldResolve) {
const beforeSubmitDiscussionState = this.discussionResolved;
this.isSubmitting = true;
@@ -216,8 +219,8 @@ export default {
class="note-textarea js-gfm-input js-note-text js-autosize markdown-area js-vue-issue-note-form js-vue-textarea qa-reply-input"
aria-label="Description"
placeholder="Write a comment or drag your files hereā€¦"
- @keydown.meta.enter="handleUpdate();"
- @keydown.ctrl.enter="handleUpdate();"
+ @keydown.meta.enter="handleKeySubmit();"
+ @keydown.ctrl.enter="handleKeySubmit();"
@keydown.up="editMyLastNote();"
@keydown.esc="cancelHandler(true);"
></textarea>