diff options
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts | 7 |
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' | |||
3 | import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' | 3 | import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' |
4 | import { NavigationEnd, Router } from '@angular/router' | 4 | import { NavigationEnd, Router } from '@angular/router' |
5 | import { MenuService, ScreenService } from '@app/core' | 5 | import { MenuService, ScreenService } from '@app/core' |
6 | import { scrollToTop } from '@app/helpers' | ||
6 | import { GlobalIconName } from '@app/shared/shared-icons' | 7 | import { GlobalIconName } from '@app/shared/shared-icons' |
7 | import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap' | 8 | import { 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 | ||