diff --git a/app/assets/stylesheets/publify.css.scss b/app/assets/stylesheets/publify.css.scss index 2b128f5c..34bd8cfc 100644 --- a/app/assets/stylesheets/publify.css.scss +++ b/app/assets/stylesheets/publify.css.scss @@ -32,3 +32,7 @@ .tag-sidebar-tag-cloud { overflow: hidden; } + +.hidden { + display: none; +} diff --git a/app/views/articles/_comment_form.html.erb b/app/views/articles/_comment_form.html.erb index 7c1edf6a..ba8c7365 100644 --- a/app/views/articles/_comment_form.html.erb +++ b/app/views/articles/_comment_form.html.erb @@ -1,7 +1,7 @@ <%= form_tag @article.comment_url, id: 'comment_form', remote: true do %>
- - + + diff --git a/app/views/articles/comment_failed.js.erb b/app/views/articles/comment_failed.js.erb index 4705fa3a..136b9fe3 100644 --- a/app/views/articles/comment_failed.js.erb +++ b/app/views/articles/comment_failed.js.erb @@ -1,3 +1,3 @@ var message = "<%= j render 'articles/comment_errors', comment: @comment %>"; $('#preview').hide(); -$('#errors').hide().html(message).fadeIn(); +$('#errors').hide().removeClass("hidden").html(message).fadeIn(); diff --git a/app/views/comments/preview.js.erb b/app/views/comments/preview.js.erb index 3cfe95c6..41ab2ca3 100644 --- a/app/views/comments/preview.js.erb +++ b/app/views/comments/preview.js.erb @@ -1,3 +1,3 @@ var preview = "<%= j render 'articles/comment_preview', comment: @comment %>"; $('#errors').hide(); -$('#preview').hide().html(preview).fadeIn(); +$('#preview').hide().removeClass("hidden").html(preview).fadeIn();