From 13ae37cb61948fed29ea70e5b3f44f89b6b23450 Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 16 Jun 2022 10:22:40 +0300 Subject: [PATCH] Tabs: fix scrolling when header is sticky --- utils/tabs/tabs.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/tabs/tabs.component.ts b/utils/tabs/tabs.component.ts index 8963614d..b165c2a7 100644 --- a/utils/tabs/tabs.component.ts +++ b/utils/tabs/tabs.component.ts @@ -122,7 +122,7 @@ export class TabsComponent implements AfterContentInit { this.disableScroll = true; setTimeout(() => { window.scrollTo({ - top: document.getElementById(tab.tabId) ? document.getElementById(tab.tabId).offsetTop - 180 : 250, + top: document.getElementById(tab.tabId) ? document.getElementById(tab.tabId).offsetTop - (this.isSticky?250:180) : 250, behavior: 'smooth' }); setTimeout(() => {