From: jordan Date: Wed, 31 Aug 2011 12:56:30 +0000 (+0000) Subject: be able to submit comment only with Ctrl + Enter X-Git-Tag: live~149 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/1548ff6a501118dbc311465306b009888fcc31a9 be able to submit comment only with Ctrl + Enter git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1168 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index 8f785e3..0c16eea 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -609,6 +609,14 @@ $(function() { return false; }); + // Submit comment with CTRL + Enter + $textarea.keydown(function(e) { + if (e.ctrlKey && e.keyCode == 13 && !$button.attr('disabled')) { + // console.log('submit'); + $(this).parent().find('input.comment-submit').click(); + } + }); + $cancel.click(function(event) { if (confirm("You will lose all of your changes in this comment. Do you still wish to proceed?")){ if (comment_in_form) {