Don't allow blank posts with Ctrl+Enter

pull/1/head
Joe Biellik 9 years ago
parent 763a9aa349
commit 26eb4041d1

@ -2,7 +2,7 @@ $(document).ready(function() {
autosize($('textarea'));
$('textarea').keydown(function(e) {
if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey) {
if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey && $(this).val()) {
$(this).closest('form').submit();
}
});

Loading…
Cancel
Save