Set timeout for window scrolling

This commit is contained in:
Konstantinos Triantafyllou 2022-03-21 14:37:26 +02:00
parent 3f370dd293
commit 825bfc4cf9
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ export class SmoothScroll {
}
}, 100);
} else {
window.scrollTo({top: 0, behavior: 'smooth'});
setTimeout( () => {
window.scrollTo({top: 0, behavior: 'smooth'});
}, 0);
}
this.lastComponent = this.currentComponent;
}