diff --git a/resources/assets/js/components/page-comments.js b/resources/assets/js/components/page-comments.js index cabce9139..5d8d16958 100644 --- a/resources/assets/js/components/page-comments.js +++ b/resources/assets/js/components/page-comments.js @@ -26,10 +26,12 @@ class PageComments { handleAction(event) { let actionElem = event.target.closest('[action]'); + if (event.target.matches('a[href^="#"]')) { const id = event.target.href.split('#')[1]; scrollAndHighlightElement(document.querySelector('#' + id)); } + if (actionElem === null) return; event.preventDefault(); diff --git a/resources/views/comments/comment.blade.php b/resources/views/comments/comment.blade.php index 5fbdfa500..ea96a9250 100644 --- a/resources/views/comments/comment.blade.php +++ b/resources/views/comments/comment.blade.php @@ -31,7 +31,7 @@
@endif