Commit 8bb34a5e authored by Furkan Ayhan's avatar Furkan Ayhan Committed by Phil Hughes

Fix sending multiple comment on note replies

parent 708ffb4e
...@@ -348,6 +348,7 @@ export default { ...@@ -348,6 +348,7 @@ export default {
id="note_note" id="note_note"
ref="textarea" ref="textarea"
v-model="updatedNoteBody" v-model="updatedNoteBody"
:disabled="isSubmitting"
:data-supports-quick-actions="!isEditing && !glFeatures.tributeAutocomplete" :data-supports-quick-actions="!isEditing && !glFeatures.tributeAutocomplete"
name="note[note]" name="note[note]"
class="note-textarea js-gfm-input js-note-text js-autosize markdown-area js-vue-issue-note-form" class="note-textarea js-gfm-input js-note-text js-autosize markdown-area js-vue-issue-note-form"
......
...@@ -150,6 +150,16 @@ describe('issue_note_form component', () => { ...@@ -150,6 +150,16 @@ describe('issue_note_form component', () => {
expect(handleFormUpdate.length).toBe(1); expect(handleFormUpdate.length).toBe(1);
}); });
it('should disable textarea when ctrl+enter is pressed', async () => {
textarea.trigger('keydown.enter', { ctrlKey: true });
expect(textarea.attributes('disabled')).toBeUndefined();
await nextTick();
expect(textarea.attributes('disabled')).toBe('disabled');
});
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment