diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/gl_field_errors.js | 6 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/gl_field_errors.js b/app/assets/javascripts/gl_field_errors.js index cf2e6d26608..73bcbd93565 100644 --- a/app/assets/javascripts/gl_field_errors.js +++ b/app/assets/javascripts/gl_field_errors.js @@ -32,9 +32,9 @@ export default class GlFieldErrors { const $form = $(e.currentTarget); if (!$form.attr('novalidate')) { - if (!event.currentTarget.checkValidity()) { - event.preventDefault(); - event.stopPropagation(); + if (!e.currentTarget.checkValidity()) { + e.preventDefault(); + e.stopPropagation(); } } } diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 2934cfe013c..fae72013957 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -558,7 +558,7 @@ export default class Notes { */ setupNoteForm(form) { var textarea, key; - new GLForm(form, this.enableGFM); + this.glForm = new GLForm(form, this.enableGFM); textarea = form.find('.js-note-text'); key = [ 'Note', @@ -1153,7 +1153,7 @@ export default class Notes { var targetId = $originalContentEl.data('target-id'); var targetType = $originalContentEl.data('target-type'); - new GLForm($editForm.find('form'), this.enableGFM); + this.glForm = new GLForm($editForm.find('form'), this.enableGFM); $editForm.find('form') .attr('action', postUrl) |