From 679cae51f2435a97faf1cc019de854c922e93d14 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 15 Feb 2023 12:04:09 +0200 Subject: [PATCH] Quick fix in page content stickyBugWorkaround. --- .../sharedComponents/page-content/page-content.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index 9c7b5c14..ec9f0f86 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -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(); }));