Tabs: fix scrolling when header is sticky

This commit is contained in:
argirok 2022-06-16 10:22:40 +03:00
parent d6fa3a87fa
commit 13ae37cb61
1 changed files with 1 additions and 1 deletions

View File

@ -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(() => {