diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js index 8cce108ee5..f7bf554638 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js @@ -136,11 +136,15 @@ } function focusOnHash($container) { - if (location.hash === ''){ + if (!location.hash.toLowerCase().startsWith('#cms-comment')){ return; } - $('html, body').animate({ scrollTop: $(location.hash).offset().top + $(this).height() / 2 }, 'slow'); + $('html, body').animate( + { + scrollTop: $(location.hash).offset().top + $(this).height() / 2 + }, + 'slow'); } function init() {