mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/14422] Support cmd+enter for submitting message
PHPBB3-14422
This commit is contained in:
parent
9bcf8df5d0
commit
8058967e7f
1 changed files with 6 additions and 0 deletions
|
@ -358,6 +358,12 @@ function getCaretPosition(txtarea) {
|
||||||
if ($('#attach-panel').length) {
|
if ($('#attach-panel').length) {
|
||||||
phpbb.showDragNDrop(textarea);
|
phpbb.showDragNDrop(textarea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('textarea').on('keydown', function (e) {
|
||||||
|
if (e.which === 13 && e.metaKey) {
|
||||||
|
$(this).closest('form').submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue