0π
β
I found a solution.
I donβt know why this works but using a setTimeout function fixed the problem.
setTimeout(() => {
window.scrollTop(0, this.currentHeight);
}, 20);
Source:stackexchange.com