0👍
✅
Try to cover your code with nextTick(() => {})
like this:
this.$nextTick(() => {
document.getElementsByClassName('msg_history')[0].scrollTop = some value;
})
This will wait till all rendering has done.
And checkout the way of calc the top location below:
Source:stackexchange.com