]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-14509 Security hotspot page scroll logic might makes item disappear
authorPhilippe Perrin <philippe.perrin@sonarsource.com>
Tue, 23 Feb 2021 08:32:21 +0000 (09:32 +0100)
committersonartech <sonartech@sonarsource.com>
Tue, 23 Feb 2021 20:07:26 +0000 (20:07 +0000)
server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx

index c8dba8306cf6c791919794255801cd727b322a80..2eb9a5e8928607f7f3b5e4353fdf09c45febb755 100644 (file)
@@ -88,7 +88,7 @@ export default function SecurityHotspotsAppRenderer(props: SecurityHotspotsAppRe
     const element =
       selectedHotspot && document.querySelector(`[data-hotspot-key="${selectedHotspot.key}"]`);
     if (parent && element) {
-      scrollToElement(element, { parent, smooth: true, topOffset: 150, bottomOffset: 400 });
+      scrollToElement(element, { parent, smooth: true, topOffset: 100, bottomOffset: 100 });
     }
   }, [selectedHotspot]);