Skip to content
Snippets Groups Projects
Commit 7a70fb12 authored by Douwe Maan's avatar Douwe Maan
Browse files

Prevent holding Control-Enter or Command-Enter from posting comment multiple times.

parent 28592ae4
No related branches found
No related tags found
1 merge request!8686add "Uplaod" and "Replace" functionality
Loading
Loading
@@ -46,6 +46,7 @@ v 7.10.0 (unreleased)
- Refactor issue filtering
- AJAX selectbox for issue assignee and author filters
- Fix issue with missing options in issue filtering dropdown if selected one
- Prevent holding Control-Enter or Command-Enter from posting comment multiple times.
 
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
Loading
Loading
Loading
Loading
@@ -57,6 +57,7 @@ class @Notes
@notes_forms = '.js-main-target-form textarea, .js-discussion-note-form textarea'
# Chrome doesn't fire keypress or keyup for Command+Enter, so we need keydown.
$(document).on('keydown', @notes_forms, (e) ->
return if e.originalEvent.repeat
if e.keyCode == 10 || ((e.metaKey || e.ctrlKey) && e.keyCode == 13)
$(@).parents('form').submit()
)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment