Fix bug when both parent and child previews are present
If the current post is displayed in both the parent and child previews, there will be a duplicate dom id. This ensures the current-post class gets added to both of them.
This commit is contained in:
@@ -247,7 +247,7 @@
|
||||
|
||||
Danbooru.Post.initialize_post_relationship_previews = function() {
|
||||
var current_post_id = $("meta[name=post-id]").attr("content");
|
||||
$("#post_" + current_post_id).addClass("current-post");
|
||||
$("[id=post_" + current_post_id + "]").addClass("current-post");
|
||||
|
||||
if (Danbooru.Cookie.get("show-relationship-previews") === "0") {
|
||||
this.toggle_relationship_preview($("#has-children-relationship-preview"), $("#has-children-relationship-preview-link"));
|
||||
|
||||
Reference in New Issue
Block a user