diff --git a/app/assets/javascripts/notes/components/issue_note_form.vue b/app/assets/javascripts/notes/components/issue_note_form.vue index 6c39b7397e7b3648907aff5b5ff19ee67e381b27..963d6ecbeb470fdbc2868a644a2b08517fe46181 100644 --- a/app/assets/javascripts/notes/components/issue_note_form.vue +++ b/app/assets/javascripts/notes/components/issue_note_form.vue @@ -33,6 +33,7 @@ initialNote: this.noteBody, note: this.noteBody, conflictWhileEditing: false, + isSubmitting: false, }; }, components: { @@ -59,10 +60,14 @@ }, currentUserId() { return this.getUserDataByProp('id'); - } + }, + isDisabled() { + return !this.note.length || this.isSubmitting; + }, }, methods: { handleUpdate() { + this.isSubmitting = true; this.$emit('handleFormUpdate', this.note); }, editMyLastNote() { @@ -79,7 +84,7 @@ cancelHandler(shouldConfirm = false) { // Sends information about confirm message and if the textarea has changed this.$emit('cancelFormEdition', shouldConfirm, this.initialNote !== this.note); - } + }, }, mounted() { this.$refs.textarea.focus(); @@ -133,7 +138,8 @@