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