From: Philippe Perrin Date: Tue, 23 Feb 2021 08:32:21 +0000 (+0100) Subject: SONAR-14509 Security hotspot page scroll logic might makes item disappear X-Git-Tag: 8.8.0.42792~117 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ec6bb5811befdfe529b9f4381342cfd4a96597b1;p=sonarqube.git SONAR-14509 Security hotspot page scroll logic might makes item disappear --- diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx index c8dba8306cf..2eb9a5e8928 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx @@ -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]);