Quick fix in page content stickyBugWorkaround.

This commit is contained in:
Konstantinos Triantafyllou 2023-02-15 12:04:09 +02:00
parent 5a782ebd48
commit 679cae51f2
1 changed files with 4 additions and 2 deletions

View File

@ -81,11 +81,13 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
}
ngOnInit() {
if(this.isBrowser) {
this.stickyBugWorkaround();
}
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
this.isMobile = isMobile;
if (typeof document !== "undefined") {
if(this.isBrowser) {
this.offset = this.isMobile?0:Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
this.stickyBugWorkaround();
}
this.cdr.detectChanges();
}));