Replace timeout with Vue ticks

This commit is contained in:
Preston 2022-02-10 18:09:33 -05:00
parent 3a3a834e14
commit ba9772a0e0
1 changed files with 4 additions and 5 deletions

View File

@ -47,13 +47,12 @@ export default Vue.extend({
activeData() {
const scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop
this.isLoading = true
setTimeout(() => {
Vue.nextTick(() => {
this.isLoading = false
// This is kinda ugly, but should fix a few existing issues
setTimeout(() => {
Vue.nextTick(() => {
window.scrollTo(0, scrollPos)
}, 200)
}, 100)
})
})
}
},
mounted: function () {