Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[ljcom] r10793: LJINT-446: Comments for side projects - ...

Committer: szhirkov
LJINT-446: Comments for side projects - improvements - ctrl+enter
U   trunk/htdocs/js/partners/placeholder.js
Modified: trunk/htdocs/js/partners/placeholder.js
===================================================================
--- trunk/htdocs/js/partners/placeholder.js	2011-08-03 06:06:01 UTC (rev 10792)
+++ trunk/htdocs/js/partners/placeholder.js	2011-08-04 04:20:11 UTC (rev 10793)
@@ -1,7 +1,14 @@
 (function ($) {
 	$(function () {
 		$('input:text, input:password, input[type=url], textarea').placeholder();
-		$('#commenttext').trigger('focus');		
+		$('#commenttext')
+			.trigger('focus')
+			.bind('keydown', function (event) {
+				if (event.which == 13 /* Enter */ && event.ctrlKey) {
+					event.preventDefault();
+					$('form').trigger('submit');
+				}
+			});		
 		
 		var submitButtons = $(':submit');
 		

Tags: aralot, js, ljcom
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments