summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorVincent Chan <plus.vincchan@gmail.com>2016-05-02 19:52:13 +0200
committerVincent Chan <plus.vincchan@gmail.com>2016-05-02 19:52:13 +0200
commit7ac1cb68f699e1a1d9a6bd4f2f59a7068d39e4b2 (patch)
tree443272a51de576788c31de466e0be7682010c3ed /apps/comments
parentfd844f3eb3bdfe1186c42df382b3de2e02c98cd4 (diff)
downloadnextcloud-server-7ac1cb68f699e1a1d9a6bd4f2f59a7068d39e4b2.tar.gz
nextcloud-server-7ac1cb68f699e1a1d9a6bd4f2f59a7068d39e4b2.zip
Submit comment on ctrl+Enter
closes #24302
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/js/commentstabview.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 415ec2a9be5..2d6671557fd 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -301,6 +301,11 @@
var limitExceeded = (len > this._commentMaxLength);
$field.toggleClass('error', limitExceeded);
$submitButton.prop('disabled', limitExceeded);
+
+ //submits form on ctrlEnter
+ if (ev.keyCode === 13 && ev.ctrlKey) {
+ $submitButton.click();
+ }
},
_onClickComment: function(ev) {