Skip to content

Commit 551357a

Browse files
KotoriMinamibimalghartimagar
authored andcommitted
fix: totop event was only triggered for once (tangbc#394)
1 parent 58fa6f5 commit 551357a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/virtual.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default class Virtual {
137137

138138
// calculating range on scroll
139139
handleScroll (offset) {
140-
this.direction = offset < this.offset ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND
140+
this.direction = offset < this.offset || offset == 0 ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND
141141
this.offset = offset
142142

143143
if (!this.param) {

0 commit comments

Comments
 (0)