Fix anchor link scrolling on load (chrome)
This commit is contained in:
parent
6bbea198e5
commit
abaaef2285
@ -35,6 +35,7 @@ export class ApiDocsComponent implements OnInit {
|
|||||||
setTimeout( () => {
|
setTimeout( () => {
|
||||||
if( this.route.snapshot.fragment ) {
|
if( this.route.snapshot.fragment ) {
|
||||||
this.openEndpointContainer( this.route.snapshot.fragment );
|
this.openEndpointContainer( this.route.snapshot.fragment );
|
||||||
|
document.getElementById( this.route.snapshot.fragment ).scrollIntoView();
|
||||||
}
|
}
|
||||||
window.addEventListener('scroll', function() {
|
window.addEventListener('scroll', function() {
|
||||||
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
|
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user