Fix kanban infinite scrolling on chrome

This commit is contained in:
kolaente 2021-03-10 17:45:07 +01:00
parent 81da1e68e2
commit 46de7dc822
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -358,8 +358,9 @@ export default {
.then(bs => {
bs.forEach(b => {
const e = this.$refs[`tasks-container${b.id}`][0]
e.onscroll = () => {
if (e.scrollTopMax <= e.scrollTop + e.scrollTop * minScrollHeightPercent) {
e.addEventListener('scroll', () => {
const scrollTopMax = e.scrollHeight - e.clientHeight
if (scrollTopMax <= e.scrollTop + e.scrollTop * minScrollHeightPercent) {
this.$store.dispatch('kanban/loadNextTasksForBucket', {
listId: this.$route.params.listId,
params: this.params,
@ -369,7 +370,7 @@ export default {
this.error(e, this)
})
}
}
})
})
})
.catch(e => {