Explorar o código

Fix scroll-load component

sbkwgh %!s(int64=7) %!d(string=hai) anos
pai
achega
670c7ae7e4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      frontend/src/components/ScrollLoad.vue

+ 1 - 1
frontend/src/components/ScrollLoad.vue

@@ -16,7 +16,7 @@
 		},
 		methods: {
 			onScroll (e) {
-				if(document.body.scrollHeight - document.body.scrollTop - 300 <= document.body.clientHeight) {
+				if((window.innerHeight + window.pageYOffset) + 300 >= document.body.scrollHeight) {
 					if(!this.loading) {
 						this.$emit('loadNext')
 					}