From 5f61e9f270631538615a0c638252128c59366abc Mon Sep 17 00:00:00 2001 From: Amaia Castro Date: Fri, 24 Feb 2017 16:31:47 +0100 Subject: [PATCH] Clear box before showing comments for anchor --- app/assets/javascripts/legislation_annotatable.js.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/legislation_annotatable.js.coffee b/app/assets/javascripts/legislation_annotatable.js.coffee index 521b61f34..57b9fc432 100644 --- a/app/assets/javascripts/legislation_annotatable.js.coffee +++ b/app/assets/javascripts/legislation_annotatable.js.coffee @@ -141,6 +141,7 @@ App.LegislationAnnotatable = if $("span[data-annotation-id='" + ann_id + "']").length el = $("span[data-annotation-id='" + ann_id + "']") el.addClass('current-annotation') + $('#comments-box').html('') App.LegislationAllegations.show_comments() $('html,body').animate({scrollTop: el.offset().top}) $.event.trigger