Tabs: fix scrolling when header is sticky
This commit is contained in:
parent
d6fa3a87fa
commit
13ae37cb61
|
@ -122,7 +122,7 @@ export class TabsComponent implements AfterContentInit {
|
||||||
this.disableScroll = true;
|
this.disableScroll = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.scrollTo({
|
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'
|
behavior: 'smooth'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue