mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 13:58:54 +00:00
Merge pull request #4211 from marc1706/ticket/14422
[ticket/14422] Support cmd+enter & ctrl+enter for submitting message
This commit is contained in:
commit
9288a50bcf
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue