posts/show: fix flickering recommended tab.

This commit is contained in:
evazion
2018-08-14 15:49:33 -05:00
parent 73fc7cab7f
commit 7174c24ac8
2 changed files with 2 additions and 7 deletions

View File

@@ -466,11 +466,6 @@ Post.initialize_post_sections = function() {
$(e.target).parent("li").addClass("active"); $(e.target).parent("li").addClass("active");
e.preventDefault(); e.preventDefault();
}); });
$("#notes").hide();
$("#edit").hide();
$("#recommended").hide();
$("#post-sections li:first-child").addClass("active");
} }
Post.resize_ugoira_controls = function() { Post.resize_ugoira_controls = function() {

View File

@@ -89,7 +89,7 @@
<% end %> <% end %>
<menu id="post-sections"> <menu id="post-sections">
<li><a href="#comments">Comments</a></li> <li class="active"><a href="#comments">Comments</a></li>
<% if RecommenderService.available_for_post?(@post) %> <% if RecommenderService.available_for_post?(@post) %>
<li><a href="#recommended">Recommended</a></li> <li><a href="#recommended">Recommended</a></li>
@@ -103,7 +103,7 @@
</menu> </menu>
<% if RecommenderService.available_for_post?(@post) %> <% if RecommenderService.available_for_post?(@post) %>
<section id="recommended"> <section id="recommended" style="display: none;">
<p><em>Loading...</em></p> <p><em>Loading...</em></p>
</section> </section>
<% end %> <% end %>