From ebdf89f798ec5b4f41d0aea973dbeabee0cb10e0 Mon Sep 17 00:00:00 2001 From: kotori Date: Wed, 19 Oct 2022 19:01:21 +0800 Subject: [PATCH] fix: totop event was only triggered for once --- src/virtual.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtual.js b/src/virtual.js index 2435cb0..6fa8997 100644 --- a/src/virtual.js +++ b/src/virtual.js @@ -138,7 +138,7 @@ export default class Virtual { // calculating range on scroll handleScroll (offset) { - this.direction = offset < this.offset ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND + this.direction = offset < this.offset || offset == 0 ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND this.offset = offset if (!this.param) {