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
commit 9288a50bcf

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