If the comment has errors, show the textarea with the error message

This commit is contained in:
Fernando Blat
2017-01-20 18:35:34 +01:00
parent 3d8724b13b
commit 63a986d31c

View File

@@ -10,3 +10,8 @@ $('a.publish-comment').on({
}
});
<% if @comment.errors.any? %>
$('a.publish-comment').hide();
$('#js-comment-form-annotation').toggle();
$('#js-comment-form-annotation textarea').focus();
<% end %>