Skip to content

Commit

Permalink
Merge pull request #76 from Sybit-Education/fix/felix
Browse files Browse the repository at this point in the history
fix: scroll state
  • Loading branch information
AlexanderKugler authored Aug 1, 2024
2 parents 77759ae + 989672b commit cbebb50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/components/detail/detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class DetailComponent implements OnInit {
}

ngOnInit(): void {
this.scrollToTop();
const osmIdString = this.route.snapshot.paramMap.get('osm_id');
if (osmIdString) {
const osmId = parseInt(osmIdString, 10);
Expand All @@ -35,4 +36,8 @@ export class DetailComponent implements OnInit {
});
}
}

scrollToTop(): void {
window.scrollTo(0, 0);
}
}

0 comments on commit cbebb50

Please sign in to comment.