diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 607b109dc0b7b01079b9ca34c4c53393487dc38a..83b1bae0ea118928889b006c59f11c036cb39fb4 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -321,7 +321,9 @@ class Notes GitLab.GfmAutoComplete.setup() form = note.find(".note-edit-form") form.show() - form.find("textarea").focus() + textarea = form.find("textarea") + textarea.focus() + disableButtonIfEmptyField textarea, form.find(".js-comment-button") ### Called in response to clicking the edit note link diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 2fd8cb6d489dd1902cafd2d94e3ccf8544644a19..5e84aed0cc40a8f9bd8f885aeeb0679fabf5ea44 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -38,10 +38,10 @@ = f.text_area :note, class: 'note_text js-note-text js-gfm-input turn-on' .form-actions.clearfix - = f.submit 'Save changes', class: "btn btn-primary btn-save" + = f.submit 'Save changes', class: "btn btn-primary btn-save js-comment-button" .note-form-option - %a.choose-btn.btn.btn-small.js-choose-note-attachment-button + %a.choose-btn.btn.js-choose-note-attachment-button %i.icon-paper-clip %span Choose File ...