mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 14:40:38 +01:00
Fix anchor link scrolling on load (chrome)
This commit is contained in:
parent
6bbea198e5
commit
abaaef2285
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue