diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index 36e21a7e..93638770 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -127,9 +127,11 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { if (this.header) { let headerObs = new IntersectionObserver(entries => { entries.forEach(entry => { - this.layoutService.setReplaceHeader(!entry.isIntersecting); + if(entry.boundingClientRect.height > 0) { + this.layoutService.setReplaceHeader(!entry.isIntersecting); + } }) - }, {threshold: 0.5}); + }); this.subscriptions.push(headerObs); headerObs.observe(this.header.nativeElement); }