Added handleKeySubmit method to match EE

This commit is contained in:
Natalia Tepluhina 2018-12-27 17:14:54 +02:00 committed by Phil Hughes
parent 32f80629bd
commit 98ad22d2aa
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
1 changed files with 5 additions and 2 deletions

View File

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