From 8058967e7fe5fdca4e0d5f14c1743a3f7207372f Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 20 Jan 2016 12:38:21 +0000 Subject: [PATCH] [ticket/14422] Support cmd+enter for submitting message PHPBB3-14422 --- phpBB/assets/javascript/editor.js | 6 ++++++ 1 file changed, 6 insertions(+) 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);