Quick fix in page content stickyBugWorkaround.
This commit is contained in:
parent
5a782ebd48
commit
679cae51f2
|
@ -81,11 +81,13 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
if(this.isBrowser) {
|
||||||
|
this.stickyBugWorkaround();
|
||||||
|
}
|
||||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = 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.offset = this.isMobile?0:Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
|
||||||
this.stickyBugWorkaround();
|
|
||||||
}
|
}
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue