Submit comment on command-enter.

Fixes #1869.
This commit is contained in:
Douwe Maan 2015-02-05 21:56:25 +01:00
parent 0a9cab4ee6
commit 71668312c4
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ v 7.8.0
-
- Add a commit calendar to the user profile (Hannes Rosenögger)
-
-
- Submit comment on command-enter
-
- Fix long broadcast message cut-off on left sidebar (Visay Keo)
- Add Project Avatars (Steven Thonus and Hannes Rosenögger)

View File

@ -59,7 +59,7 @@ class @Notes
@notes_forms = '.js-main-target-form textarea, .js-discussion-note-form textarea'
$(document).on('keypress', @notes_forms, (e)->
if e.keyCode == 10 || (e.ctrlKey && e.keyCode == 13)
if e.keyCode == 10 || ((e.metaKey || e.ctrlKey) && e.keyCode == 13)
$(@).parents('form').submit()
)