Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: totop event was only triggered for once #394

Merged
merged 1 commit into from
May 29, 2023

Conversation

KotoriMinami
Copy link
Contributor

@KotoriMinami KotoriMinami commented Oct 19, 2022

What kind of this PR? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Build-related changes
  • Other, please describe:

Other information:
Move the scrollbar to the top and keep the mouse pressed long.
After triggering the first totop event, add some data forward.
The first totop event end,the second to top event will no longer be triggered.
Since after the first trigger, the this.offset becomes 0, and at the second trigger the handleScroll incoming offset is 0.
For now comparing the two leads to this.direction = BEHIND, which estimates a wrong direction, causing the second totop to be no longer triggered.

@tangbc tangbc merged commit 0d7d686 into tangbc:master May 29, 2023
bimalghartimagar pushed a commit to bimalghartimagar/vue-virtual-scroll-list that referenced this pull request Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants