1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-20 00:21:42 +02:00

Merge pull request #4211 from marc1706/ticket/14422

[ticket/14422] Support cmd+enter & ctrl+enter for submitting message
This commit is contained in:
Marc Alexander
2016-03-10 22:09:19 +01:00

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 || e.ctrlKey)) {
$(this).closest('form').submit();
}
});
});
})(jQuery);