From 46de7dc822e82ade47ae921f19bff7b1ec4a415f Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 10 Mar 2021 17:45:07 +0100 Subject: [PATCH] Fix kanban infinite scrolling on chrome --- src/views/list/views/Kanban.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/list/views/Kanban.vue b/src/views/list/views/Kanban.vue index 248705bd..b07e35dc 100644 --- a/src/views/list/views/Kanban.vue +++ b/src/views/list/views/Kanban.vue @@ -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 => {