Commit eebd7533 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'fix-bug-causing-comment-to-submit-twice' into 'master'

Fix bug causing comment form in issue to submit twice when CTRL+Enter is pressed twice



See merge request !3655
parents 34d7619a de4d98fd
......@@ -29,7 +29,11 @@ $(document).on 'keydown.quick_submit', '.js-quick-submit', (e) ->
e.preventDefault()
$form = $(e.target).closest('form')
$form.find('input[type=submit], button[type=submit]').disable()
$submit_button = $form.find('input[type=submit], button[type=submit]')
return if $submit_button.attr('disabled')
$submit_button.disable()
$form.submit()
# If the user tabs to a submit button on a `js-quick-submit` form, display a
......
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