From abaaef2285b425b13a2c59738c1a7e98f01aa216 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Sat, 11 Jun 2022 12:17:34 -0400 Subject: [PATCH] Fix anchor link scrolling on load (chrome) --- frontend/src/app/docs/api-docs/api-docs.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/docs/api-docs/api-docs.component.ts b/frontend/src/app/docs/api-docs/api-docs.component.ts index 94eccd4e2..3d68ef75c 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.ts +++ b/frontend/src/app/docs/api-docs/api-docs.component.ts @@ -35,6 +35,7 @@ export class ApiDocsComponent implements OnInit { setTimeout( () => { if( this.route.snapshot.fragment ) { this.openEndpointContainer( this.route.snapshot.fragment ); + document.getElementById( this.route.snapshot.fragment ).scrollIntoView(); } window.addEventListener('scroll', function() { that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";