diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-06-27 19:06:38 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-06-27 19:06:38 +0300 |
commit | 64b0a799f3a3d6099734f83803519624bc0be7c1 (patch) | |
tree | 6b58775cd2c9f4707e5158d0d001dc0b55cfa0e3 /app | |
parent | 6ab588665c786a187b47cce8097325d22613cdb3 (diff) |
Resolve "Submitting reply to existing diff discussion using Cmd/Ctrl+Enter submits twice and refreshes page"
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/behaviors/quick_submit.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/quick_submit.js b/app/assets/javascripts/behaviors/quick_submit.js index 1f9e0448084..bc693616460 100644 --- a/app/assets/javascripts/behaviors/quick_submit.js +++ b/app/assets/javascripts/behaviors/quick_submit.js @@ -40,7 +40,7 @@ $(document).on('keydown.quick_submit', '.js-quick-submit', (e) => { e.preventDefault(); const $form = $(e.target).closest('form'); - const $submitButton = $form.find('input[type=submit], button[type=submit]'); + const $submitButton = $form.find('input[type=submit], button[type=submit]').first(); if (!$submitButton.attr('disabled')) { $submitButton.trigger('click', [e]); |