summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/js/commentstabview.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 2d6671557fd..7cda071d311 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -172,7 +172,7 @@
this.$el.find('.avatar').avatar(OC.getCurrentUser().uid, 28);
}
this.delegateEvents();
- this.$el.find('textarea').on('keyup input change', this._onTypeComment);
+ this.$el.find('textarea').on('keydown input change', this._onTypeComment);
},
_formatItem: function(commentModel) {
@@ -273,7 +273,7 @@
// spawn form
$comment.after($formRow);
$formRow.data('commentEl', $comment);
- $formRow.find('textarea').on('keyup input change', this._onTypeComment);
+ $formRow.find('textarea').on('keydown input change', this._onTypeComment);
// copy avatar element from original to avoid flickering
$formRow.find('.avatar').replaceWith($comment.find('.avatar').clone());
@@ -302,8 +302,8 @@
$field.toggleClass('error', limitExceeded);
$submitButton.prop('disabled', limitExceeded);
- //submits form on ctrlEnter
- if (ev.keyCode === 13 && ev.ctrlKey) {
+ //submits form on ctrl+Enter or cmd+Enter
+ if (ev.keyCode === 13 && (ev.ctrlKey || ev.metaKey)) {
$submitButton.click();
}
},