aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts')
-rw-r--r--client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
index ba5568595..2cafb6c55 100644
--- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
@@ -3,6 +3,7 @@ import { filter } from 'rxjs/operators'
3import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' 3import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'
4import { NavigationEnd, Router } from '@angular/router' 4import { NavigationEnd, Router } from '@angular/router'
5import { MenuService, ScreenService } from '@app/core' 5import { MenuService, ScreenService } from '@app/core'
6import { scrollToTop } from '@app/helpers'
6import { GlobalIconName } from '@app/shared/shared-icons' 7import { GlobalIconName } from '@app/shared/shared-icons'
7import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap' 8import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap'
8 9
@@ -96,11 +97,7 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy {
96 97
97 onActiveLinkScrollToTop (link: HTMLAnchorElement) { 98 onActiveLinkScrollToTop (link: HTMLAnchorElement) {
98 if (!this.isBroadcastMessageDisplayed && this.router.url.includes(link.getAttribute('href'))) { 99 if (!this.isBroadcastMessageDisplayed && this.router.url.includes(link.getAttribute('href'))) {
99 window.scrollTo({ 100 scrollToTop('smooth')
100 left: 0,
101 top: 0,
102 behavior: 'smooth'
103 })
104 } 101 }
105 } 102 }
106 103