1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-13 20:32:11 +02:00

[ticket/14422] Support cmd+enter for submitting message

PHPBB3-14422
This commit is contained in:
Callum Macrae 2016-01-20 12:38:21 +00:00 committed by Marc Alexander
parent 9bcf8df5d0
commit 8058967e7f

View File

@ -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);