From d59dd4a28821c018e11ba993e9650dc3cc137158 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 24 Aug 2020 10:19:35 +0300 Subject: [PATCH] pull/5134 requested changes --- .../Pages/CmsKit/Shared/Components/Commenting/default.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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() {