diff options
Diffstat (limited to 'client/src/app/+about/about-instance/about-instance.component.ts')
-rw-r--r-- | client/src/app/+about/about-instance/about-instance.component.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index e1809d7b7..15841be74 100644 --- a/client/src/app/+about/about-instance/about-instance.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts | |||
@@ -35,6 +35,8 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked { | |||
35 | 35 | ||
36 | serverConfig: ServerConfig | 36 | serverConfig: ServerConfig |
37 | 37 | ||
38 | private lastScrollHash: string | ||
39 | |||
38 | constructor ( | 40 | constructor ( |
39 | private viewportScroller: ViewportScroller, | 41 | private viewportScroller: ViewportScroller, |
40 | private route: ActivatedRoute, | 42 | private route: ActivatedRoute, |
@@ -74,7 +76,11 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked { | |||
74 | } | 76 | } |
75 | 77 | ||
76 | ngAfterViewChecked () { | 78 | ngAfterViewChecked () { |
77 | if (window.location.hash) this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) | 79 | if (window.location.hash && window.location.hash !== this.lastScrollHash) { |
80 | this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) | ||
81 | |||
82 | this.lastScrollHash = window.location.hash | ||
83 | } | ||
78 | } | 84 | } |
79 | 85 | ||
80 | openContactModal () { | 86 | openContactModal () { |