aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
authorCallum Macrae <callum@macr.ae>2016-01-20 12:38:21 +0000
committerMarc Alexander <admin@m-a-styles.de>2016-03-10 12:31:04 +0100
commit8058967e7fe5fdca4e0d5f14c1743a3f7207372f (patch)
tree8a91c87261ff6ffc8fdd016c9c766d72040237b6 /phpBB/assets
parent9bcf8df5d0bf1ca813f4fb860ea3128aa905104a (diff)
downloadforums-8058967e7fe5fdca4e0d5f14c1743a3f7207372f.tar
forums-8058967e7fe5fdca4e0d5f14c1743a3f7207372f.tar.gz
forums-8058967e7fe5fdca4e0d5f14c1743a3f7207372f.tar.bz2
forums-8058967e7fe5fdca4e0d5f14c1743a3f7207372f.tar.xz
forums-8058967e7fe5fdca4e0d5f14c1743a3f7207372f.zip
[ticket/14422] Support cmd+enter for submitting message
PHPBB3-14422
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/editor.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js
index 298526ab1f..8b2d5741b7 100644
--- a/phpBB/assets/javascript/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -358,6 +358,12 @@ function getCaretPosition(txtarea) {
if ($('#attach-panel').length) {
phpbb.showDragNDrop(textarea);
}
+
+ $('textarea').on('keydown', function (e) {
+ if (e.which === 13 && e.metaKey) {
+ $(this).closest('form').submit();
+ }
+ });
});
})(jQuery);